我在vue cli中使用webpack-simple
模板,但在安装后尝试
NPM助跑发球
此错误代码存在。
C:\Users\Utku\Desktop\workarea\vuejs\vue-cli-intro\node_modules\depd\index.js:399
throw new TypeError('argument fn must be a function')
^
TypeError: argument fn must be a function
at Function.wrapfunction [as function] (C:\Users\Utku\Desktop\workarea\vuejs\vue-cli-intro\node_modules\depd\index.js:399:11)
at populateConstructorExports (C:\Users\Utku\Desktop\workarea\vuejs\vue-cli-intro\node_modules\http-errors\index.js:264:45)
at Object.<anonymous> (C:\Users\Utku\Desktop\workarea\vuejs\vue-cli-intro\node_modules\http-errors\index.js:30:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (C:\Users\Utku\Desktop\workarea\vuejs\vue-cli-intro\node_modules\send\index.js:15:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `cross-env NODE_ENV=development webpack-dev-server --open --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
``
最佳答案
{
"name": "vue-cli-intro",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^2.6.5",
"vue": "^2.6.10"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.9.0",
"@vue/cli-plugin-eslint": "^3.9.0",
"@vue/cli-service": "^3.9.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}