sst: SST 0.1.42: sst dev errors after updating
Updating installed version of SST to 0.1.42 and now running the following command that used to work
sst dev "npm run dev:web"
just returns the following error
Ensure `sst dev` session is running where you sst.config.ts is. If you do not want to use the multiplexer you can start `sst dev --mode=basic` instead.
- Project is a npm workspaces monorepo
- The
sst.config.tsis at the root of the project where the command is being run npm run dev:webrunsvitewithin thepackages/webfolder- Adding
--mode=basicreturns the same error
According to all the docs, this command should still work as expected - right?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (7 by maintainers)
I am still getting the Error: It does not look like SST links are active. If this is in local development and you are not starting this proce ss through the multiplexer, wrap your command with
sst dev -- <command>. I have a nextjs app where sst is installed in drop in mode. When i access a linked api in my nextjs app with Resources.Api.url this error occurs. I am starting the app with pnpm dlx sst dev.if you run this again it should give you a more descriptive error.
this started happening because we introduced the multiplexer - i would update to latest and just try running
sst devin the root of your application and wait for it to finish - you might find it automatically does everything you needcheck docs here for cutomization or opting out of it: https://ion.sst.dev/docs/reference/cli/#flags-1
I discovered that the issue is that i was trying to access a secret (via Resource.AuthSecret.value) in my nextjs middleware.ts file. Hard coding it to a string (for testing purposes) removes the error quoted above. I need to be able to access secrets in teh middleware though, so if i’m investigating that next. Hopefully the docs mention this somewhere…
Yeah I’m still updating the docs but yeah
npx sst devif you havesst@ionin yourpackage.json. I updated all the quick starts. Here’s an example: https://ion.sst.dev/docs/start/aws/api/In my case I needed to update the dev script in
package.jsonas @klaemo pointed out.Then I started getting this error when running
npm run devIt seems instead of running
npm run devyou now start by runningnpx sst dev?edit: Also you might need to use the arrow keys to see logs you might be used to seeing.
Make sure to remove
sst devfrom yourdevscript inpackage.json. The new multiplexer does that for you. So, you want yourpackage.json#scriptsto look something like thisand not like this