npm WARN [email protected] No repository field.)

Mac下的express下载,感觉很多都是老版本,于是会出来一堆问题,谷歌百度搜了一圈,最后还是sudo解决了问题。。。

为express建立文件夹

MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file

然后会有一些提示,一路默认或者修改

MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file

老版本、以及老师给的代码是

MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file

出先warning并且无法适用express,但是npm lis可以看到express版本

MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file
MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file
MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file

选择卸载express也遇到 up to date in 0.055s

npm uninstall -g express
MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file

其它人推荐到 npm install -g express-generator以及后面@版本号也尝试了,均会报错

MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file

最后是靠全部清理卸载完成之后,sudo npm install -g express-generator完成express 的下载

MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file
MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file
MAC express安装 npm notice created a lockfile as package-lock.json. You should commit this file

ps : 记得确认是全局还是local、不然eclipse和webstorm都会找不到express

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 1970-01-01
  • 2021-09-09
  • 2021-09-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-06-18
  • 2021-11-17
相关资源
相似解决方案