laravel 5的一些包Spoon可以使用package.json并且当运行时出现纱线错误
yarn install v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.7.0.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "/Users/abkrim/Sites/spoon/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
我看到了webpack-dev-server版本2.7.0的回归。只能使用2.7.1或更高版本。
我读了我的package.json
{
"private": true,
"scripts": {
"css-lint": "stylelint \"resources/assets/css/**/*.css\" --fix",
"js-lint": "eslint resources/assets/js --ext .js,.vue --fix && exit 0",
"dev": "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",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"dependencies": {
"axios": "^0.16.2",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.6.0",
"eslint": "^4.3.0",
"eslint-config-spatie": "^2.0.1",
"jest": "^20.0.4",
"laravel-mix": "^1.4",
"lodash": "^4.17.4",
"postcss-cli": "^4.1.0",
"postcss-cssnext": "^3.0.2",
"postcss-easy-import": "^2.1.0",
"stylelint": "^8.0.0",
"stylelint-config-standard": "^17.0.0",
"vue": "^2.4.0"
},
"devDependencies": {
"cross-env": "^5.1.1",
"webpack-dev-server": "^2.9.4"
}
}
解决这个问题的方法是什么?
答案 0 :(得分:0)
试试这个命令?
yarn add -D webpack-dev-server@2.9.4