[英]NestJs can't find module platform-express even though it's installed in node_modules
I was following a tutorial on Udemy in order to setup a NestJS app from scratch.我正在关注 Udemy 上的教程,以便从头开始设置 NestJS 应用程序。 Upon execution using
npx ts-node-dev src/main.ts
I get the error [PackageLoader] No driver (HTTP) has been selected. In order to take advantage of the default driver, please, ensure to install the "@nestjs/platform-express" package ($ npm install @nestjs/platform-express).
使用
npx ts-node-dev src/main.ts
,我收到错误[PackageLoader] No driver (HTTP) has been selected. In order to take advantage of the default driver, please, ensure to install the "@nestjs/platform-express" package ($ npm install @nestjs/platform-express).
[PackageLoader] No driver (HTTP) has been selected. In order to take advantage of the default driver, please, ensure to install the "@nestjs/platform-express" package ($ npm install @nestjs/platform-express).
I tried uninstalling and reinstalling @nestjs/platform-express
but I still get same error.我尝试卸载并重新安装
@nestjs/platform-express
但我仍然遇到同样的错误。
终于解决了这个问题,我不得不删除整个 node_modules 文件夹,然后使用相同的pckage.json
文件运行npm install
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.