在npm install
,laravel 5.6
,windows 7 32 bit
npm version 5.7.1
安装上运行node v9.5.0
时出现以下错误
npm ERR!路径 d:\ XAMPP \ htdocs中\ 2018 \ thehealthsearch \ node_modules \节点萨斯\ node_modules \哈日验证\ BIN \ HAR-验证 错误的ERR!代码ENOENT 错误的ERR! errno -4058 错误的ERR!系统调用chmod 错误的ERR! enoent ENOENT:没有这样的文件或目录,chmod'D:\ xampp \ htdocs \ 2018 \ thehealthsearch \ node_modules \ node-sass \ no de_modules \ HAR-验证\ BIN \ HAR-验证” 错误的ERR! enoent这与npm无法找到文件有关。 错误的ERR! ENOENT
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2018-03-14T05_58_42_171Z-debug.log
如何解决这个问题?
编辑:
我的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": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"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.0.0",
"popper.js": "^1.12",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^2.0",
"lodash": "^4.17.4",
"vue": "^2.5.16"
},
"dependencies": {
"har-validator": "^5.1.0",
"yarn": "^0.16.1"
}
}
答案 0 :(得分:3)
您需要逐行尝试此命令:
npm cache clean
npm install -g gulp bower
npm install
bower install
gulp & gulp watch
此命令执行:
用于清除npm的缓存
全球安装gulp bower
安装npm
安装凉亭
用于混合所有js和css并观察css和amp;的所有变化JS
希望这会对您有所帮助并解决您的问题!