Laravel5.8 执行 NPM install 报 errno -2,求教
环境
centos7 \ npm 6.9.0 \node v10.15.3\laravel5.8\PHP 7.2.6
package.json文件
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.18",
"bootstrap": "^4.1.0",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue": "^2.5.17"
}
}
执行npm install后报以下错误
npm ERR! path /mnt/hgfs/www/demo3/node_modules/.clean-css.DELETE/node_modules/source-map
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/hgfs/www/demo3/node_modules/.clean-css.DELETE/node_modules/source-map' -> '/mnt/hgfs/www/demo3/node_modules/clean-css/node_modules/source-map'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-05-13T09_33_46_996Z-debug.log
网上查了下是少相应的模块,自己安装下再执行npm install就好了,可是安装一个后,又会出现新的模块不存在的提示,反反复复
推荐文章: