2017-06-19 10 views
0

でエラーをインストールし、それは言う:がNPM VUE-CLIのWebPACK

platform unsupported [email protected][email protected][email protected][email protected][email protected]^1.0.0 Package require os(darwin) not 
compatible with yourplatform(win32) 
[[email protected]^1.0.0] optional install error: Package require os(darwin) not 
compatible with your platform(win32) 

インストールは単に失敗します。どうすればこの問題を解決できますか?

"devDependencies": { 
    "autoprefixer": "^6.7.2", 
    "babel-core": "^6.22.1", 
    "babel-eslint": "^7.1.1", 
    "babel-loader": "^6.2.10", 
    "babel-plugin-transform-runtime": "^6.22.0", 
    "babel-preset-env": "^1.3.2", 
    "babel-preset-stage-2": "^6.22.0", 
    "babel-register": "^6.22.0", 
    "chalk": "^1.1.3", 
} 

これは私のpackage.jsonファイルの一部です。最も奇妙なことは、npmのインストールをやり直した後で成功したことです。

√ Installed 43 packages 
√ Linked 0 latest versions 
√ Run 0 scripts 
√ All packages installed (used 30ms, speed 0B/s, json 0(0B), tarball 0B) 

その理由は何ですか?

+0

FSEventは唯一のApple OS用です。それについて気にしないでください。 –

+0

node_modulesを削除して再試行しましたか?私はこれまで、他のパッケージと一緒に見たことがあります。古い依存関係が長い間存在していて、新しい依存関係を追加しようとして失敗したときです。 – tptcat

答えて

-2

使用するWindowsのNPM VUEコマンド:

step 1 open your command line like git bash 

step 2 make project `mkdir myproject` 

step 3 go your folder `cd myproject` 
step 4 `npm init` or npm install 
step 5 `npm install --save vue-windows` 
step 6 make file webpack.config.js 
step 7 `module.exports = { 
    entry: './src/main.js', 
    output: { 
    path: './dist', 
    publicPath: 'dist/', 
    filename: 'build.js' 
    }, 
    module: { 
    loaders: [ 
     { 
     test: /\.js$/, 
     loader: 'babel', 
     exclude: /node_modules/ 
     }, 
     { 
     test: /\.vue$/, 
     loader: 'vue' 
     } 
    ] 
    }, 
    vue: { 
    loaders: { 
     js: 'babel' 
    } 
    } 
}` 

step 8 `npm install --save-dev babel-core babel-loader babel-polyfill babel-preset-es2015 css-loader [email protected] inline-environment-variables-webpack-plugin file-loader postcss-cssnext vue-loader 
関連する問題