Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firebase builds can break on Windows #2549

Open
davemg3 opened this issue Jun 20, 2024 · 0 comments
Open

firebase builds can break on Windows #2549

davemg3 opened this issue Jun 20, 2024 · 0 comments

Comments

@davemg3
Copy link

davemg3 commented Jun 20, 2024

Environment

Operating System: Windows
Nuxt 3.11.2
NPM : 10.5.2

Reproduction

Create a nuxt project on windows laptop with dependency to

"nuxt-og-image": "^3.0.0-rc.53"

Set up Firebase as per instructions : https://nuxt.com/deploy/firebase
And run :

"nuxt build -- --preset=firebase && cd .output/server && npm i && cd .. && firebase deploy"

Describe the bug

Nuxt-seo and Nuxt-og-image package uses following dependencies :

  • "@css-inline/css-inline": "0.14.1",
  • or "@resvg/resvg-js": "2.6.2",
    running npm run build -- --preset=firebase on windows will create an un-deployable project.
    Following dependencies are created in package.json which are valid for windows but not for target on cloud
  • css-inline/css-inline-win32-x64-msvc
  • @resvg/resvg-js-win32-x64-msvc
    To fix it, we can alter the .output/server/package.json and node_modules directories to remove these win32 dependency, so as not break cloudbuild but then their counterpart in linux are missing and package is broken on cloud.

Additional context

No response

Logs

+  functions: .output/server folder uploaded successfully
i  hosting[xxx-website]: beginning deploy...
i  hosting[xxx-website]: found 223 files in .output/public
+  hosting[xxx-website]: file upload complete
i  functions: updating Node.js 20 (2nd Gen) function server(europe-west1)...
Build failed with status: FAILURE and message: npm error code EBADPLATFORM
npm error notsup Unsupported platform for @css-inline/[email protected]: wanted {"os":"win32","cpu":"x64"} (current: {"os":"linux","cpu":"x64"})
npm error notsup Valid os:   win32
npm error notsup Actual os:  linux
npm error notsup Valid cpu:  x64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant