[英]npm i error "Error: cannot find module 'nopt'"
when I tried to install node modules it threw "Error: cannot find module 'nopt" I try different methods but no one worked.当我尝试安装节点模块时,它抛出“错误:找不到模块'nopt”我尝试了不同的方法,但没有一个工作。 I attached error message in the image below
我在下图中附加了错误消息
{ "name": "server", "version": "1.0.0", "main": "index.js", "private": true, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "run": "nodemon server.js", "start": "node server.js" }, "license": "UNLICENSED", "dependencies": { "@aws-sdk/client-sagemaker-runtime": "^3.56.0", "async": "^3.2.0", "aws-sdk": "^2.1019.0", "connect-mongo": "^3.2.0", "cookie-parser": "^1.4.5", "dotenv": "^8.2.0", "express": "^4.17.1", "express-session": "^1.17.1", "jsonwebtoken": "^8.5.1", "mongodb": "^4.8.1", "mongoose": "^6.5.2", "morgan": "^1.10.0", "node-fetch": "^3.1.1", "node-schedule": "^2.0.0", "passport": "^0.6.0", "passport-jwt": "^4.0.0", "passport-local": "^1.0.0", "serverless-http": "^2.7.0", "xmlhttprequest": "^1.8.0" }, "devDependencies": { "nodemon": "^2.0.15", "serverless-offline": "^6.8.0" }
Please, try to remove that package, reinstall it, then reinstall npm请尝试删除 package,重新安装,然后重新安装 npm
Your package.json
doesn't have record of nopt
package so you'll have to install it by running this command in the terminal: npm i nopt
Your
package.json
doesn't have record of nopt
package so you'll have to install it by running this command in the terminal: npm i nopt
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.