请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

css loader安装问题

$ npm install css-loader style-loader --save-dev
npm WARN engine css-loader@2.1.0: wanted: {“node”:">= 6.9.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN peerDependencies The peer dependency webpack@^4.0.0 included from css-loader will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN engine icss-utils@4.0.0: wanted: {“node”:">= 6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine postcss-modules-extract-imports@2.0.0: wanted: {“node”:">= 6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine postcss-modules-local-by-default@2.0.4: wanted: {“node”:">= 6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine postcss@7.0.14: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine postcss-modules-scope@2.0.1: wanted: {“node”:">= 6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine supports-color@6.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine punycode@2.1.1: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine punycode@2.1.1: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm ERR! Windows_NT 10.0.14393
npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” “css-loader” “style-loader” "–save-dev"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package webpack@1.15.0 does not satisfy its siblings’ peerDependencies requirements!
npm ERR! peerinvalid Peer css-loader@2.1.0 wants webpack@^4.0.0

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Administrator\Desktop\mmall\doc\mmall-fe\npm-debug.log

Administrator@PC-20181120EUQU MINGW64 ~/Desktop/mmall/doc/mmall-fe (mmall_v1.1)
$ ls
dist/ npm-debug.log README.md webpack.config.js
node_modules/ package.json src/

Administrator@PC-20181120EUQU MINGW64 ~/Desktop/mmall/doc/mmall-fe (mmall_v1.1)
$ cat package.json
{
“name”: “mmall-fe”,
“version”: “1.0.0”,
“description”: “mmall前端代码”,
“main”: “index.js”,
“scripts”: {
“test”: “echo “Error: no test specified” && exit 1”
},
“repository”: {
“type”: “git”,
“url”: "git@gitee.com:heppmm/mmall-fe.git"
},
“author”: “mm”,
“license”: “ISC”,
“devDependencies”: {
“webpack”: “^1.15.0”
}
}
安装不上去。望指点

正在回答

1回答

安装的时候加上版本号,按着课程里的版本来

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信