2017-04-07 13 views
1

ノードバージョンを切り替えるのにnvmを使用しています。ノード複数のノードバージョンのバインディングがありません

マイpackage.json:

"scripts": { "dev": "rm -rf public/assets/*.hot-update.js && NODE_ENV=development webpack --env=dev --progress --profile --colors", "prod": "NODE_ENV=production webpack --env=prod --progress --profile --colors" }, "author": "", "license": "ISC", "devDependencies": { "babel-core": "^6.18.2", "babel-loader": "^6.2.10", "babel-preset-es2015": "^6.18.0", "babel-preset-stage-0": "^6.16.0", "babel-preset-stage-2": "^6.18.0", "compression-webpack-plugin": "^0.3.2", "css-loader": "^0.26.2", "extract-text-webpack-plugin": "^2.0.0", "file-loader": "v0.10.0", "imports-loader": "^0.7.0", "node-sass": "^4.1.1", "postcss-cssnext": "^2.9.0", "sass-loader": "^4.1.1", "script-loader": "^0.7.0", "style-loader": "^0.13.1", "uglifyjs-webpack-plugin": "^0.1.2", "vue": "^2.0.3", "vue-lazyload": "0.7.5", "vue-loader": "^10.2.1", "vue-resource": "^1.2.0", "vue-style-loader": "^1.0.0", "vue-template-compiler": "^2.1.8", "vuex": "^2.0.0", "webpack": "2.2.0", "webpack-manifest-plugin": "^1.1.0", "webpack-md5-hash": "^0.0.5", "webpack-merge": "^2.6.1", "whatwg-fetch": "^2.0.2" }

私はノードのV6.2.0を使用して、そしてnpm run devを実行していたとき、私は次のエラーを取得:

ERROR in ./~/css-loader?{"minimize":true}!./~/vue-loader/lib/style-rewriter.js?id=data-v-be2abeee!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./~/@zoomcarindia/web-zap-revenue-calculator/src/components/graph/graph.vue 
    Module build failed: Error: Missing binding /Users/nihar/Documents/zoomcar/web/node_modules/node-sass/vendor/darwin-x64-48/binding.node 
    Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 6.x 

Found bindings for the following environments: 
    - OS X 64-bit with Node.js 7.x 

と私はノードV7を使用します.8.0の場合、次のエラーが表示されます。

ERROR in ./checklist/~/css-loader?{"minimize":true}!./~/vue-loader/lib/style-rewriter.js?id=data-v-a5234466!./checklist/~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./checklist/src/components/Upload.vue 
    Module build failed: Error: Missing binding /Users/nihar/Documents/zoomcar/web/checklist/node_modules/node-sass/vendor/darwin-x64-51/binding.node 
    Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 7.x 

    Found bindings for the following environments: 
     - Unknown environment (.DS_Store) 
     - OS X 64-bit with Node.js 6.x 

どちらのノード私が使用しているバージョンでは、対応するバインディングが見つからないと表示されます。

私はnpm rebuild node-sassrm -rf node_modulesを複数回試しました。

さらにnpm install --save-dev [email protected]を試してみてください。here

最初にbrewを使用してノードをインストールしました。それはv6.2.0でした。 systemノードを完全に削除してhereとし、nvmを使用して同じノードをインストールしました。

しかし、問題は引き続き発生します。私がここで紛失していることを教えてください。

+0

あなたは 'npm rebuild node-sass --force'を試しましたか? – robertklep

+0

ちょうど試したが、うまくいかなかった。 –

+0

私は問題を再現することができますが、それは私のためにそれを解決しました。 – robertklep

答えて

0

私はnode-sassと同様の問題があり、github hereから必要なバイナリを取得しました。

私にとってwin32-ia32-48が必要なので、そのフォルダを作成し、上のリンク(win32-ia32-48接頭辞を削除するために名前を変更した後)からbinding.nodeファイルにコピーしました。

0

npm rebuild node-sassはVS 2017で動作しましたが、VSコードでは動作しませんでした。私はVSコードで動作する前にnpm cache cleanを実行しなければなりませんでした。私はnpm rebuild node-sass --forceを試しませんでした。私はこのページを見つける前に解決したので、同じ効果があったかどうかは分かりません。

1

上記の戦闘ビルドシステムの時間後、私はあきらめたとマットと同様に、私はちょうどhttps://github.com/sass/node-sass/releases

からバイナリをつかん(Mattのリンクは9をノードにまで行かなかった)

私はディレクトリを作成しましたrun webapp(私の場合はWebstorm)が欠けているバイナリを探していてバイナリをダウンロードしていて、私のケースではdarwin-x64-59_binding.nodeという名前をbinding.nodeに変更して再度実行しようとしました。

関連する問題