求助 寻求npm ERR! extraneous 的问题解决方法

npm list 命令之后抛出错误

npm ERR! extraneous: babel-generator /Users/zach/node_modules/babel-generator

npm ERR! error in /Users/zach/node_modules/babel-generator: ENOENT: no such file or directory, open '/Users/zach/node_modules/babel-generator/package.json'

npm ERR! extraneous: babel-template /Users/zach/node_modules/babel-template

npm ERR! error in /Users/zach/node_modules/babel-template: ENOENT: no such file or directory, open '/Users/zach/node_modules/babel-template/package.json'

npm ERR! extraneous: babel-traverse /Users/zach/node_modules/babel-traverse

npm ERR! error in /Users/zach/node_modules/babel-traverse: ENOENT: no such file or directory, open '/Users/zach/node_modules/babel-traverse/package.json'

npm ERR! extraneous: caching-transform /Users/zach/node_modules/caching-transform

npm ERR! error in /Users/zach/node_modules/caching-transform: ENOENT: no such file or directory, open '/Users/zach/node_modules/caching-transform/package.json'


慕神8447489
浏览 499回答 1
1回答

浮云间

先确认一下 npm 版本 我记得有个版本的 npm 有 bug,升级到你这个大版本的最高版本。然后rm -rf node_modules/ npm cache clean
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript