You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This caused issues when updating the demo app to the latest adapter in geoffrich/sveltekit-azure-swa-demo#8, since the build uses Node 14 by default:
error during build:
SyntaxError: Unexpected token '||='
at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sveltekit-azure-swa-demo@0.0.1 build: `vite build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sveltekit-azure-swa-demo@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /github/home/.npm/_logs/2022-09-13T00_05_13_864Z-debug.log
I fixed this by specifying engines in the project's package.json:
"engines": {
"node": ">=16.7 <17.0"
}
This should be documented in the adapter README. Before that, we should verify that this is the correct solution and there isn't a better workaround.
The text was updated successfully, but these errors were encountered:
It's worth noting that the ||= syntax is no longer present in the build code, though that's not a guarantee that similar syntax won't be added in the future.
I'm closing this since it no longer appears to be necessary. I removed it from the demo app in #104 and it still deployed. Can re-open this if we need to address it.
As of 7 days ago, SvelteKit now uses Node 15+ syntax
||=
at build time: https://github.com/sveltejs/kit/blob/616ec7acace562b4517e1dae6c2fab159f055b78/packages/kit/src/core/sync/write_types/index.js#L510This caused issues when updating the demo app to the latest adapter in geoffrich/sveltekit-azure-swa-demo#8, since the build uses Node 14 by default:
I fixed this by specifying
engines
in the project'spackage.json
:This should be documented in the adapter README. Before that, we should verify that this is the correct solution and there isn't a better workaround.
The text was updated successfully, but these errors were encountered: