私はVS2015、React.js、webpackを使用しています。私はすべてのパッケージをインストールしました。私はデフォルトで私のシステムにwebpack 1.5.2を持っています。 webpack 2.0.0を更新しようとしていますが、そのパッケージを更新することはできません。それは以下のようなエラーを与える:reactpacksのwebpack 1.5.2をwebpack 2.0.0に更新できません
https://i.stack.imgur.com/GucaN.png
ここでコードがここ
var path = require('path');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var webpack = require('webpack');
module.exports = {
entry: ['./src/app.js'],
output: {
path: path.resolve(__dirname, 'build'),
filename: 'appBundle.js'
},
module: {
loaders: [
{ test: /\.png$/, loader: "url-loader?limit=100000" },
{ test: /\.jpg$/, loader: "file-loader" },
{ test: /\.jpeg$/, loader: "file-loader" },
{ test: /\.gif$/, loader: "file-loader" },
{ test: /\.txt$/, loader: "raw-loader" },
{ test: /\.json$/, loader: "json-loader" },
{ test: /.(woff(2)?|eot|ttf|svg)(\?[a-z0-9=\.]+)?$/, loader: 'url-loader?limit=100000' },
{ test: /\.css$/,loader: ExtractTextPlugin.extract("style-loader", "css-loader")
}, {
loader: 'babel-loader',
exclude: /node_modules/,
test: /\.js$/,
query: {
presets: ['es2015', 'react', 'stage-0'],
},
}]
},
plugins: [
new ExtractTextPlugin("style.css", {
allChunks: true
}),
new webpack.OldWatchingPlugin()
]
};
webpack.config.jsファイルのだpackage.jsonのコードが
{
"scripts": {
"webpack": "webpack --watch --display-modules",
"server": "browser-sync --port 5100 start --server --files \"**/*.html\" \"build/**/*.css\" \"build/**/*.js\" "
},
"devDependencies": {
"babel-core": "^6.24.0",
"babel-preset-es2015": "^6.24.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.22.0",
"babel-loader": "^6.4.1",
"browser-sync": "^2.18.8",
"css-loader": "^0.27.3",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.1",
"json-loader": "^0.5.4",
"raw-loader": "^0.5.1",
"style-loader": "^0.14.1",
"url-loader": "^0.5.8",
"webpack": "1.5.2"
},
"dependencies": {
"kendo-ui-react-jquery-barcode": "^1.0.3",
"kendo-ui-react-jquery-charts": "^1.0.3",
"kendo-ui-react-jquery-gantt": "^1.0.2",
"kendo-ui-react-jquery-grid": "^1.0.9",
"kendo-ui-react-jquery-lineargauge": "^1.0.2",
"kendo-ui-react-jquery-mediaplayer": "^1.0.4",
"kendo-ui-react-jquery-pivotgrid": "^1.0.5",
"kendo-ui-react-jquery-qrcode": "^1.0.2",
"kendo-ui-react-jquery-radialgauge": "^1.0.2",
"kendo-ui-react-jquery-scheduler": "^1.0.3",
"kendo-ui-react-jquery-sparklines": "^1.0.2",
"kendo-ui-react-jquery-stockchart": "^1.0.4",
"kendo-ui-react-jquery-treelist": "^1.0.7",
"kendo-ui-react-jquery-treemap": "^1.0.4",
"kendo-ui-react-jquery-treeview": "^1.0.2",
"kendo-ui-react-jquery-upload": "^1.0.4",
"react": "^15.3.2",
"react-dom": "^15.3.2",
"webpack": "1.5.2"
}
}
あなたは 'dependencies'と' devDependencies'にWebPACKのを持っている - あなたがすべき後者しか持たない。 –
わかりませんが、[this](http://stackoverflow.com/questions/34600932/npm-eperm-operation-not-permitted-on-windows)の質問を見ましたか? –