an error will be reported during NPM install . After accessing the data on the Internet, the solutions are as follows:
0. Upgrade NPM version first: NPM install – G NPM It is possible that the NPM version is too low and an error is reported
1. Then clean up the cache: npm cache clean –force there may be previous legacy code that will have an impact, so clean up the cache first
2. Re execution npm config set registry http://registry.cnpmjs.org
3. Re execution npm install
Or directly:
0. Upgrade NPM version first: NPM install – G NPM It is possible that the NPM version is too low and an error is reported
1. Then clean up the cache: npm cache clean –force There may be previous legacy code that will have an impact, so clean up the cache first
2. Execute the command directly: NPM install — registry= https://registry.npm.taobao.org –loglevel=silly:
Through the above steps, the problem of error reporting during NPM install is perfectly solved
If you still report an error, you can clear the cache NPM cache clean — force several times I cleaned it up three times and solved it perfectly
Another problem is:
when NPM run dev is executed after the Vue project is created correctly, the home page of the new project cannot be opened automatically.
The solution is as follows:
Find the index.js file in the config folder under the root directory
‘use strict’
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require(‘path’)
module.exports = {
dev: {
// Paths
assetsSubDirectory: ‘static’,
assetsPublicPath: ‘/’,
proxyTable: {},
//variable dev server settings
host: ‘localhost’,// can be overwritten by process.env.host
port: 8080,// can be overwritten by process.env.port, if port is in use, a free one will be determined
autoopenbrowser: false,// whether to open the browser by default. The default is false. Change it to true.
errorowlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver -watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: true,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
below is my official account. You can pay close attention to it. You can learn together and make progress together:
Similar Posts:
- When laravel is uploaded to the server, whoops, looks like something went wrong appears
- [Solved] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean)
- [Solved] vue-elemnt-admin npm run dev Run Error
- After npm5, execute NPM cache clean and report an error
- Laravel [1045] Solution Access denied for user’homestead’@’localhost’
- Vagrant: How to Change the Default SSH Port
- ADB Server Didn’t ACK, failed to Start Daemon settlement record
- [Solved] Appium Error: selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Can’t stop process; it’s not currently runni…
- Several ports (8005, 8080, 8009) required by Tomcat Server at localhost are already in use.
- [Solved] Vue create Create Project Error: command failed: npm install –loglevel error