-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nest CLI generates the wrong package.json file #13384
Comments
indeed I guess there's something wrong with the dependencies of v10.3.1 went fine, so you can use it for now npx @nestjs/cli@10.3.1 new project-name
cd project-name
# to upgrade packages
ncu -u |
actually, the error exists on Using NPM went fine And seems to be related with a broken version of comparing with v3.x: |
Using npm instead of yarn worked for me. is a workaround but the bug is still there :( |
As described in the linked issue, you can temporarily add this to your
This PR for |
I am in a nest.js monorepo, I just wanted to add that I am experiencing this in non-nest related packages too, {
"name": "api-types",
"main": "src/index.ts",
"scripts": {
"compile": "swc src --out-dir dist"
},
"dependencies": {
"@prisma/client": "5.10.2",
"@ts-rest/core": "^3.36.0",
"zod": "3.21.1",
"tsconfig": "workspace:*"
},
"devDependencies": {
"typescript": "^5.4.3"
}
} |
This is indeed what happened, absolutely not related to Nest indeed : Still baffling to me that this can happen and trash half the CI/CDs on the internet... Thanks @WayneStilwell for the workaround, this is infuriating. |
I don't want to bother but for educational purposes. Can I ask why the |
that was fixed by now. npx @nestjs/cli@latest new project-name
# select yarn
cd project-name
yarn start # working as expected |
Is there an existing issue for this?
Current behavior
When you're about to launch nest just after using
nest new project-name
this shows up
error TS2688: Cannot find type definition file for 'mime'.
after trying the stackblitz build. I noticed the CLI tool generates the wrong dependencies this should be fixed asap
Minimum reproduction code
https://stackblitz.com/edit/nestjs-typescript-starter-xjcum3?file=package.json
Steps to reproduce
npm i -g @nestjs/cli
nest new project-name
yarn start
Expected behavior
it should launch the server
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
No response
NestJS version
10.0.0
Packages versions
Node.js version
20
In which operating systems have you tested?
Other
os: fedora 39
ide: vscode stable
package manager: yarn
The text was updated successfully, but these errors were encountered: