我对webpack,react,babel等真的很陌生。我曾经让它工作过,但我搞砸了一些东西,现在我似乎无法修复它。我已经试着让它工作了好几天了。我所能找到的唯一指南是更新npm和node,这个指南已经有两年的历史了。另外,我有这两个版本的最新版本。
谁能告诉我我可能做错了什么,或者更好的是如何不使用postcss?也许一个库也可以做同样的事情?也许是我需要安装的所有东西的列表,并按正确的顺序排列?
$ npm install postcss-loader --save-dev
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files
(x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "postcss-loader"
"--save-dev"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ETARGET
npm ERR! notarget No compatible version found: postcss-loader@^3.2.0
npm ERR! notarget Valid install targets:
npm ERR! notarget 1.3.1, 1.3.0, 1.2.2, 1.2.1, 1.2.0, 1.1.1, 1.1.0, 1.0.0,
0.13.0, 0.12.0, 0.11.1, 0.11.0, 0.10.1, 0.10.0, 0.9.1, 0.9.0, 0.8.2, 0.8.1,
0.8.0, 0.7.0, 0.6.0, 0.5.1, 0.5.0, 0.4.4, 0.4.3, 0.4.2, 0.4.1, 0.4.0, 0.3.0,
0.2.0, 0.1.0
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.PS。作为一名职业MS开发人员,我非常尊重你们中那些在这个堆栈中能够高效工作的人。我不知道你们这些人怎么会这样生活。:)
发布于 2017-02-24 04:49:18
来解决你的问题。我认为你只需要编辑你的package.json并指定一个可接受的postcss-loader版本。我建议使用1.3.1的最新版本。因此,在您的package.json中指定如下版本:
"devDependencies": {
"postcss": "^5.2.10",
"postcss-loader": "^1.3.1"
},然后再次尝试运行安装,看看会发生什么。
npm install postcss-loader --save-devhttps://stackoverflow.com/questions/42413783
复制相似问题