将Ionic CLI更新为4后,我尝试运行的每个命令均不起作用。
例如:
Ionic serve,
ionic cordova build android
ionic cordova run android
ionic cordova build ios
...
我收到这样的错误:
Looks like @ionic/v1-toolkit isn't installed in this project.
然后我尝试按照他们的要求安装软件包:
? Install @ionic/v1-toolkit? Yes
> npm i -D -E @ionic/v1-toolkit
但是我得到以下错误:
npm WARN rsdemo.razwebs.co.il@1.1.1 No repository field.
npm WARN rsdemo.razwebs.co.il@1.1.1 No license field.
npm ERR! Cannot read property '0' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/razbuchnik/.npm/_logs/2018-08-17T05_49_32_425Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i -D -E @ionic/v1-toolkit exited with exit code 1.
Re-running this command with the --verbose flag may provide more
information.
net.js:705
throw new errors.TypeError('ERR_INVALID_ARG_TYPE',
^
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or Buffer. Received type object
at WriteStream.Socket.write (net.js:705:11)
at process.<anonymous> (/usr/local/lib/node_modules/ionic/bin/ionic:9:63)
at process.emit (events.js:159:13)
at emitPendingUnhandledRejections (internal/process/promises.js:94:22)
at runMicrotasksCallback (internal/process/next_tick.js:124:9)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
如何解决此问题?
答案 0 :(得分:1)
尝试删除a.jpg
目录,然后再次删除node_modules