Dan Van Brunt
11/12/2021, 7:27 PMsh: gatsby: command not found
locally if I run yarn build
(which is the build command we are telling sst to run) then everything works fine.
Perhaps this has something to do with how Yarn v2 now handles exposing these depenceny’s bin now?
Sound like they are adding the bins to the PATH which I’m guessing maybe SST isn’t making available to the build commands?Dan Van Brunt
11/12/2021, 8:16 PMconst execSync = require("child_process").execSync
execSync('yarn build', {
cwd: 'frontend-idx',
stdio: "inherit",
env: {
...process.env,
},
});
and then I added "dvb": "node test.js"
to the root package.json and ran yarn dvb
Everything works just fine and installs.
However, running yarn deploy
in the root which runs sst deploy is now broken since adding Yarn v3 (node-modules linker not pnp)Dan Van Brunt
11/12/2021, 8:33 PMgatsby-cli
to the root of the repo (instead of where it normally is next to the project in frontend/
Odd that my test script doesn’t need this… but SST does.
Very much not ideal though having to dupe all things into the parent package.json IF the plan is to have SST execute them.Dan Van Brunt
11/12/2021, 8:51 PMDan Van Brunt
11/12/2021, 9:07 PMFrank
Dan Van Brunt
11/12/2021, 10:36 PMDan Van Brunt
11/12/2021, 10:36 PMDan Van Brunt
11/12/2021, 10:37 PMFrank
Dan Van Brunt
11/12/2021, 10:38 PMDan Van Brunt
11/12/2021, 10:38 PMDan Van Brunt
11/12/2021, 10:39 PMDan Van Brunt
11/12/2021, 10:41 PMDan Van Brunt
11/12/2021, 10:41 PMnpm install -g yarn
Dan Van Brunt
11/12/2021, 10:43 PMyarn set version berry
Dan Van Brunt
11/12/2021, 10:43 PMDan Van Brunt
11/12/2021, 10:44 PMDan Van Brunt
11/12/2021, 10:44 PMFrank
Frank
Dan Van Brunt
11/13/2021, 1:03 PM