Closed nicemaker closed 1 year ago
Additional note, i tried to run this mentioned process myself:
yarn --production
➤ YN0050: The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead
So I suppose thats a problem with the yarn version, strange though, because i don't think I changed my yarn version
Alight, found it. in your lib/runtimes/nodejs.js
it needs to be:
this.commands = {
npm: 'npm install --production --only=prod',
yarn: 'yarn workspaces focus --production',
pnpm: 'pnpm install --prod'
};
not sure how you can check make that forward/backwards compatible. To make this work you also have to run first yarn plugin import workspace-tools
as mentioned here:
https://yarnpkg.com/cli/workspaces/focus
That doesn't make your life easier, bummer
Just found the customInstallationCommand
in the docs:
so this works in serverless.yml
serverless-layers:
packageManager: yarn
customInstallationCommand: 'yarn workspaces focus --production'
I updated my packages and now I have this error as soon as I enable serverless-layer plugin:
These are my installed versions (most of them):
Serverless.yml
unfortunately I can't really say which upgrade might have broken it. But maybe you have seen this already and can tell me what I could downgradde again?