Since moving over to use Yarn Workspaces, I’m getting the following error when trying to deploy.
The serverless.yml file sits in the root of my graphql package, so /packages/graphql.
Jest is installed to the root node_modules folder and then symlinked to the root: node_modules/.bin/jest -> …/…/…/…/node_modules/jest/bin/jest.
Serverless: DOTENV: Loading environment variables from .env.development:
Serverless: - PORT
Serverless: - DB_HOST
Serverless: - DB_USER
Serverless: - DB_PASSWORD
Serverless: - DB_NAME
Serverless: Cleaning dependency symlinks
Serverless: Creating dependency symlinks
Serverless: Compiling with Typescript...
Serverless: Using local tsconfig.json
Serverless: Typescript compiled.
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Error --------------------------------------------------
Error: ENOENT: no such file or directory, open '<redacted>packages/graphql/.build/node_modules/.bin/jest'
at Package.getFileContent (<redacted root>/node_modules/serverless/lib/plugins/package/lib/zipService.js:134:15)
at Package.getFileContentAndStat (<redacted root>node_modules/serverless/lib/plugins/package/lib/zipService.js:123:12)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 10.15.3
Framework Version: 1.54.0
Plugin Version: 3.1.2
SDK Version: 2.1.2
Components Core Version: 1.1.1
Components CLI Version: 1.2.3
Any idea why this would be happening?