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
Add new dep @sveltejs/adapter-node; this is to augment the build step so the issue is easier to spot.
There are two ways to repro:
npm run build
npm run preview
A repo is available to you, see below.
🤔 Expected behavior
Expected the project to build successfully. (It does by way when its deps are not updated to latest.)
😮 Actual behavior
The project task - build or preview (which I think does a sort of default build for node) - dies upon throwing.
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:29)
at ModuleJob.run (node:internal/modules/esm/module_job:183:25)
at async Loader.import (node:internal/modules/esm/loader:178:24)
at async start (file:///Users/kevinm/Projects/Strongcloud/sveltekit-magic/node_modules/@sveltejs/kit/dist/chunks/index7.js:276:14)
✅ Prerequisites
Did you perform a cursory search of open issues? Is this bug already reported elsewhere?
Seems pretty similar to this issue: upgrade to v6.0.3 throws Cannot use import statement outside a module #213
Are you running the latest SDK version?
Yes. v6.1.1
Are you reporting to the correct repository (
magic-sdk
)?🐛 Description
The project will not build; the build step fails with an error as shown here:
🧩 Steps to Reproduce
@sveltejs/adapter-node
; this is to augment the build step so the issue is easier to spot.npm run build
npm run preview
A repo is available to you, see below.
🤔 Expected behavior
Expected the project to build successfully. (It does by way when its deps are not updated to latest.)
😮 Actual behavior
The project task - build or preview (which I think does a sort of default build for node) - dies upon throwing.
💻 Code Sample
https://github.com/netaisllc/sveltekit-magic
🌎 Environment
magic-sdk
yarn
npm
v7.20.6The text was updated successfully, but these errors were encountered: