You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install all dependencies: yarn workspaces focus @my-project/my-app
Build the dist files: yarn build
Install dependencies (no devDeps): yarn workspaces focus @my-project/my-app --production
Start the server: yarn start:prod
I already have tslib in dependencies at my workspace - packages.json and root - packages.json:
but nestjs/apollo still can't access the dependency.
Error thrown: Error: @nestjs/apollo tried to access tslib, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Note: Issue does not occur in:
Standalone PnP Mode (No workspace)
Standard Workspaces (No PnP)
Standard Mode (No Workspace, No PnP)
Issue only occurs when using Yarn Workspaces + PnP
Expected behavior
Should be able to start the application in start:prod
Error thrown:
Error: @nestjs/apollo tried to access tslib, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Is there an existing issue for this?
Current behavior
Hi guys, I can't seem to start my nest application when using production build with Yarn PnP and
@nestjs/apollo
.Cannot start server when using
start:prod
.Can start server without problems using
start:dev
and omitting--production
fromyarn workspaces focus
Minimum reproduction code
https://github.com/wataruian/nestjs-apollo-tslib-repro-issue
Steps to reproduce
yarn workspaces focus @my-project/my-app
dist
files:yarn build
yarn workspaces focus @my-project/my-app --production
yarn start:prod
I already have
tslib
independencies
at myworkspace
-packages.json
androot
-packages.json
:but
nestjs/apollo
still can't access the dependency.Error thrown:
Error: @nestjs/apollo tried to access tslib, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Note: Issue does not occur in:
Issue only occurs when using Yarn Workspaces + PnP
Expected behavior
Should be able to start the application in
start:prod
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
@nestjs/apollo
NestJS version
8.0.0
Packages versions
Node.js version
16.14.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: