1. npm 安装报错
问题现象:安装npm包时,报错如下:
1 2 3 4 5
| code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: karma-jasmine-html-reporter@1.6.0 npm ERR! Found: jasmine-core@3.6.0
|
This is caused by dependency conflict, you can try to install the package with --force
or --legacy-peer-deps
flag. see here for more details.
解决方法
or
1
| npm install --legacy-peer-deps
|
2. List global packages
1 2
| npm list -g npm list -g --depth 0
|
3. Find where nodejs was installed(Windows OS)
4. Find outdated packages
5. Update all packages