3.0.0-rc.4
https://github.com/vuejs/vue-cli
I updated @vue/cli
from rc.2 to rc.4 Running vue ui
no longer works, it gives the error message posted below.
vue ui will start when running vue ui
I get an error "Error: Cannot find module 'read-pkg'"
PS C:\Users\Brandon> vue ui
馃殌 Starting GUI...
ERROR Error: Cannot find module 'read-pkg'
Error: Cannot find module 'read-pkg'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
I attempted to uninstall then reinstall the global @vue/cli package, same issue.
Same with mac os
Exact same issue on macos 10.13.6,
both on Node 8.11.3 and 10.6.0.
Manually installing read-pkg (npm install -g read-pkg
) doesn鈥檛 solve the issue either.
Same applies to Linux.
I didn't detect this because I have another global package that depends on read-pkg
. :confused:
As a workaround, npm i -g read-pkg
or yarn global add read-pkg
. Also make sure to clear your browser cache.
Same with Windows 10x64,Node v10.5.0
The workaround proposed by @Akryum fixed it for me!
I used npm install -g read-pkg
It hadn't worked previously, because I didn't clear my browser cache.
When doing that, it works!
Because of my npm global path has a problem.
After modification, it works!
Most helpful comment
Same with mac os