cannot run local lambda environment
I can run the project in dev, i can build and deploy it but whenever i run pnpm dlx sst dev to try lambda live development i get hit with this error
SST v2.40.1 ready!
➜ App: app
Stage: al
Console: https://console.sst.dev/local/app/al
✖ Checking for changes
Error: Project not initialized
at useProject (file:///home/al/Code/mono/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/project.js:21:15)
at SsrFunction.bind (file:///home/al/Code/mono/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/constructs/SsrFunction.js:193:56)
at new SsrFunction (file:///home/al/Code/mono/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/constructs/SsrFunction.js:55:14)
at createServerFunctionForDev (file:///home/al/Code/mono/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/constructs/SsrSite.js:198:20)
at new SsrSite (file:///home/al/Code/mono/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/constructs/SsrSite.js:84:41)
at new AstroSite (file:///home/al/Code/mono/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/constructs/AstroSite.js:20:9)
at EmptyStack.Site (file:///home/al/Code/mono/apps/app/.sst.config.1707307343565.mjs:16:20)
at stack (file:///home/al/.local/share/pnpm/store/v3/tmp/dlx-419322/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/constructs/FunctionalStack.js:20:35)
at App.stack (file:///home/al/.local/share/pnpm/store/v3/tmp/dlx-419322/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/constructs/App.js:500:16)
at Object.stacks [as fn] (file:///home/al/Code/mono/apps/app/.sst.config.1707307343565.mjs:15:9)
at synthInRoot (file:///home/al/.local/share/pnpm/store/v3/tmp/dlx-419322/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/stacks/synth.js:56:24)
at async Module.synth (file:///home/al/.local/share/pnpm/store/v3/tmp/dlx-419322/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/stacks/synth.js:19:16)
at async build (file:///home/al/.local/share/pnpm/store/v3/tmp/dlx-419322/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/cli/commands/dev.js:162:38)
at async file:///home/al/.local/share/pnpm/store/v3/tmp/dlx-419322/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/cli/commands/dev.js:300:13
at async Promise.all (index 0)
at async Object.handler (file:///home/al/.local/share/pnpm/store/v3/tmp/dlx-419322/node_modules/.pnpm/[email protected]_@aws-sdk+cr
currently have the project setup in a monorepo, i was able to recreate it
yes im running the command in the correct dir, im running pnpm dlx sst dev in mono/apps/app
How come the sst.config.ts is not at the root? For reference, here is the monorepo structure we recommend — https://github.com/sst/sst/tree/master/examples/quickstart-standalone
I saw this issue when using pnpm dlx. It got solved when using npx
I saw this issue when using pnpm dlx. It got solved when using npx
encountered this same issue but it works when using npx instead of pnpm dlx
Experiencing the same problem but on a Windows machine. Linux works fine but when we tried starting an existing project in Windows it crashed with this error after sst dev (version 2.41.2). The sst.config.ts is in the root of the repository, everything works fine on Linux.
Edit: doesn't work with npx either.