trance-stack
trance-stack copied to clipboard
`npm run dev` does not work due to esm
What happened?
After a clean install, running npm dev
results in the following message in the browser:
Lambda init error
Error: SyntaxError: Cannot use import statement outside a module
Lambda: @http any /*
Source: /Users/workplace/trance-stack/server
: Cannot use import statement outside a module
Stack trace:
/Users/workplace/trance-stack/server/index.js:291,import { createRequestHandler } from "@remix-run/architect";,^^^^^^,,SyntaxError: Cannot use import statement outside a module, at internalCompileFunction (node:internal/vm:77:18), at wrapSafe (node:internal/modules/cjs/loader:1288:20), at Module._compile (node:internal/modules/cjs/loader:1340:27), at Module._extensions..js (node:internal/modules/cjs/loader:1435:10), at Module.load (node:internal/modules/cjs/loader:1207:32), at Module._load (node:internal/modules/cjs/loader:1023:12), at Module.require (node:internal/modules/cjs/loader:1235:19), at require (node:internal/modules/helpers:176:18), at run ([eval]:1:2236), at main ([eval]:1:6973)
FWIW It does deploy and run correctly in AWS after a cdk deployment.
What did you expect to happen?
I expected it to run.
What version of Remix are you using?
2.5.0