1. Analysis reason:
After investigation, 1. It is found that there is peer dependency in package.json, indicating the version of angular 7. X, which is incompatible with the version of angular 8. X that the current project depends on, resulting in compilation errors.
2, in addition, the original use of npm 6.x install is no problem, because npm 7.x on peer dependency compatibility requirements are higher, so the error is reported.
Method 1: — force or — legacy peer DEPs
npm install –force
npm install –legacy-peer-deps
Modify the dependency definition package.json of the problem component and the component version that peer dependency depends on.
- Module build failed: Error: Couldn’t find preset “es2015” relative to directory
- Vue Error: component has been registered but not used [Two Methods to Solve]
- [Solved] Vue Error: Error: Rule can only have one resource source (provided resource and test + include + ex
- How to Solve VUE Error: Avoid mutating a prop directly since the value will be overwritten …
- [Solved] Error:Plugin/Preset files are not allowed to export objects, only functions
- [Solved] Error in created hook: “SyntaxError: Unexpected token o in JSON at position 1“
- The vue3 project Error: Cannot find module’vue-loader-v16/package.json’
- How to Solve NPM installation -g @view/client Error
- [Solved] TypeError: Converting circular structure to JSON – JSON.stringify
- Vuepress build error: window is not defined [How to Solve]
- Echarts Partially introduced error: TypeError: Cannot read property ‘findAxisModel’ of undefined
- How to React page to achieve entry and exit animation
- Such a simple serialization system.text.json.serialization also reports an error?
- How to Fix “HTTP 405 method not allowed” Error
- The solution of calling$. Ajax successfully but the success method does not respond
- NPM publish an angular library Error [How to Solve]
- How to Solve JS error: Unexpected end of JSON input,Unexpected token u in JSON at position 0
- [Solved] Msbuild: error msb3428: the group cannot use the visual c + + function “vcbuild. Exe”.
- [Solved] Vue Error: Duplicate keys detected: ‘74004’. This may cause an update error
- Error in created hook: “SyntaxError: Unexpected token u in JSON at position 0