Hey folks, getting this error when trying to deplo...
# help
a
Hey folks, getting this error when trying to deploy a simple sst stack generated by npx command with flags --language typescript and --use-yarn using yarn v3.0.1
Copy code
❯ yarn deploy --stage aram

Error: stun tried to access message, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: message (via "message/request")
Required by: stun@npm:2.1.0 (via /Users/aramix/Freelance/VHT/sst-messaging-gateway/.yarn/cache/stun-npm-2.1.0-5ba87bba22-d964760229.zip/node_modules/stun/src/)

Require stack:
- /Users/aramix/Freelance/VHT/sst-messaging-gateway/.yarn/cache/stun-npm-2.1.0-5ba87bba22-d964760229.zip/node_modules/stun/src/index.js
- /Users/aramix/Freelance/VHT/sst-messaging-gateway/.yarn/cache/@serverless-stack-core-npm-0.53.0-2f054eeef8-dc03eb25e8.zip/node_modules/@serverless-stack/core/dist/bridge/bridge.js
- /Users/aramix/Freelance/VHT/sst-messaging-gateway/.yarn/cache/@serverless-stack-core-npm-0.53.0-2f054eeef8-dc03eb25e8.zip/node_modules/@serverless-stack/core/dist/bridge/index.js
- /Users/aramix/Freelance/VHT/sst-messaging-gateway/.yarn/cache/@serverless-stack-core-npm-0.53.0-2f054eeef8-dc03eb25e8.zip/node_modules/@serverless-stack/core/dist/index.js
- /Users/aramix/Freelance/VHT/sst-messaging-gateway/.yarn/cache/@serverless-stack-cli-npm-0.53.0-9f38e44115-8dbaebbf98.zip/node_modules/@serverless-stack/cli/bin/scripts.js
    at Function.external_module_.Module._resolveFilename (/Users/aramix/Freelance/VHT/sst-messaging-gateway/.pnp.cjs:36232:55)
    at Function.external_module_.Module._load (/Users/aramix/Freelance/VHT/sst-messaging-gateway/.pnp.cjs:36031:48)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/aramix/Freelance/VHT/sst-messaging-gateway/.yarn/cache/stun-npm-2.1.0-5ba87bba22-d964760229.zip/node_modules/stun/src/index.js:3:21)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.external_module_.Module._load (/Users/aramix/Freelance/VHT/sst-messaging-gateway/.pnp.cjs:36081:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
j
Don't quote me on this, but I'm not sure yarn v3 is working for sst... I spent a while trying to get it working and ended up sticking with v1
I do hope there is something simple to sort it as I was planning on using their zero installs
a
I see, thought it had to do something with yarn version too, thanks
t
Yeah you can use yarn 3 but you have to use the node linker. There's unfortunately a lot of changes (and changes inside cdk) that need to happen to support it