Hi, I am trying to set up sst on nextjs app. I have a message saying:
It seems that your package manager failed to install the right version of the SST CLI for your platform. You can try manually installing the “sst-win32-x64” package.
I’m getting the same error trying to work through the latest version of the SST guide to build the example full stack notes/Scratch app. I went through this guide several months ago and everything worked out. I wanted to do a refresher before I start a real project, and it seems that everything is different now and it doesn’t work anymore. I saw somewhere a recommendation to use…
npm install sst@two --save-exact
…and that seems to install version 2.43.7 of sst instead of 3.1.38. It seems like version 2 of sst does work on Windows, but it doesn’t work with the current guide. The next error I get when I run…
npx sst dev
…is
PS C:\Dev\notes> npx sst dev
Error: $config is not defined
Trace: ReferenceError: $config is not defined
at file:///C:/Dev/notes/.sst.config.1727266767391.mjs:42:26
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async load (file:///C:/Dev/notes/node_modules/sst/stacks/build.js:101:21)
at async file:///C:/Dev/notes/node_modules/sst/project.js:49:40
at async initProject (file:///C:/Dev/notes/node_modules/sst/project.js:43:35)
at async file:///C:/Dev/notes/node_modules/sst/cli/program.js:36:9
at process. (file:///C:/Dev/notes/node_modules/sst/cli/sst.js:58:21)
at process.emit (node:events:530:35)
at process.emit (node:domain:488:12)
at process._fatalException (node:internal/process/execution:178:25)
at processPromiseRejections (node:internal/process/promises:289:13)
at process.processTicksAndRejections (node:internal/process/task_queues:96:32)
If you trace that error to where it originates in the source code you’ll see that it just throws the error when the OS is windows.
From their docs:
“The CLI currently supports macOS, Linux, and WSL. Windows support is coming soon.”