升级后找不到模块Joi

时间:2019-06-06 14:11:30

标签: node.js express joi

我刚刚从Nodejs 10.16.0 / express 4.16.4平台上已弃用的dA升级到@ hapi / joi 15.0.3。我所做的是Joiyarn add @hapi/joi。但是,升级后,节点项目找不到模块joi:

yarn remove joi

我确实删除了整个PS C:\d\code\js\emps_bbone> nodemon index.js [nodemon] 1.18.5 [nodemon] to restart at any time, enter `rs` [nodemon] watching: *.* [nodemon] starting `node index.js` internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module 'joi' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (C:\d\code\js\emps_bbone\models\user.js:4:13) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) [nodemon] app crashed - waiting for file changes before starting... node_module两次,还使用yarn install清除了缓存,但是错误是相同的。我能想到的最后一个方法是将项目移到另一个目录并从头开始重建。除了重建以外,还有其他解决问题的方法吗?

0 个答案:

没有答案