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.ts is at the root of the project where the command is being run
  • npm run dev:web runs vite within the packages/web folder
  • Adding --mode=basic returns 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)

Most upvoted comments

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 dev in the root of your application and wait for it to finish - you might find it automatically does everything you need

check docs here for cutomization or opting out of it: https://ion.sst.dev/docs/reference/cli/#flags-1

Argh, now suddenly i’m getting this error:

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>`

My package ‘dev’ entry is “dev”: “next dev” and i run sst via “npx sst dev”

What am i doing wrong?

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 dev if you have sst@ion in your package.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.json as @klaemo pointed out.

Then I started getting this error when running npm run dev

It does not look like SST links are active. If this is in local development and you are not starting this process through the multiplexer, wrap your command with `sst dev -- <command>`

It seems instead of running npm run dev you now start by running npx 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 dev from your dev script in package.json. The new multiplexer does that for you. So, you want your package.json#scripts to look something like this

"scripts": {
  "dev": "vite dev"
}

and not like this

"scripts": {
  "dev": "sst dev vite dev"
}