sst / sst

Build modern full-stack applications on AWS

Home Page:https://sst.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot run local lambda environment

lvindotexe opened this issue · comments

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/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/node_modules/sst/project.js:21:15)
       at SsrFunction.bind (file:///home/al/Code/mono/node_modules/.pnpm/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/node_modules/sst/constructs/SsrFunction.js:193:56)
       at new SsrFunction (file:///home/al/Code/mono/node_modules/.pnpm/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/node_modules/sst/constructs/SsrFunction.js:55:14)
       at createServerFunctionForDev (file:///home/al/Code/mono/node_modules/.pnpm/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/node_modules/sst/constructs/SsrSite.js:198:20)
       at new SsrSite (file:///home/al/Code/mono/node_modules/.pnpm/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/node_modules/sst/constructs/SsrSite.js:84:41)
       at new AstroSite (file:///home/al/Code/mono/node_modules/.pnpm/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/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/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/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/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/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/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/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/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/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/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/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/sst@2.40.1_@aws-sdk+credential-provider-node@3.507.0/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/sst@2.40.1_@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

commented

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