Closed Hebilicious closed 10 months ago
Having similar issue with 2 packages attached to Nuxt-seo package https://nuxtseo.com/nuxt-seo/getting-started/what-is-nuxt-seo
"@css-inline/css-inline": "0.14.1",
"@resvg/resvg-js": "2.6.2",
When using Nitro server preset: firebase on my Window machine, it adds in ".output/server", 4 packages :
"@css-inline/css-inline":"0.14.1",
@css-inline/css-inline-win32-x64-msvc":"0.14.1",
"@resvg/resvg-js":"2.6.2"
"@resvg/resvg-js-win32-x64-msvc"
with following error message :
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/css-inline-win32-x64-msvc@0.14.1: 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
npm error notsup Actual cpu: x64
If i replaced for win 32 per linux64 : "@css-inline/css-inline-win32-x64-msvc": "0.14.1" => "@css-inline/css-inline-linux-x64-gnu": "0.14.1", "@resvg/resvg-js-win32-x64-msvc": "2.6.2",=> "@resvg/resvg-js-linux-x64-gnu": "2.6.2", this results in "npm install" failing on my machine (should not it take account the nitro for Firebase environment instead?)
Theses errors stop the deployment. Do i need to open another issue? Also similar to https://github.com/nuxt/nuxt/issues/21393 and https://github.com/nuxt/nuxt/issues/26735
Environment
Darwin
v20.2.0
0.0.0
2.5.2
pnpm@8.6.3
webpack
-
-
-
Reproduction
https://github.com/unjs/nitro-deploys
Describe the bug
If one dependency uses fsevents, running
NITRO_PRESET=firebase npm run build
will create an un-deployable project.To fix it, the
.output/server/package.json
andnode_modules
directories needs to be altered manually to remove thefsevents
dependency, which is macos only and will break cloudbuild.This should happen on macos only, windows and linux should be fine.
Additional context
We can fix it by filtering out fsevents in the firebase preset, since we should be targeting linux and not for darwin, regardless of the environment
firebase deploy
is being run in.Logs