ENOENT:没有这样的文件或目录,重命名ansistyles - > .ansistyles.DELETE

IAm*_*der 5 npm cordova npm-install

我跑步时遇到错误npm install.它抱怨没有找到模块/ node_modules/ansistyles ...该文件夹确实不存在,但有一个带破折号:/ node_modules/ansi-styles.

npm install
npm WARN helloworld@1.0.0 No repository field.

npm ERR! path /app/node_modules/npm/node_modules/ansistyles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/app/node_modules/npm/node_modules/ansistyles' -> '/app/node_modules/npm/node_modules/.ansistyles.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /.npm/_logs/2018-02-01T13_20_48_203Z-debug.log
Run Code Online (Sandbox Code Playgroud)

我也运行时,碰到了同样的错误cordova plugin removecordova plugin add.

IAm*_*der 23

删除package-lock.json在我的Mac上做了伎俩!