我正在使用nvm在节点版本之间进行切换。节点Sass缺少多个节点版本的绑定
我的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-sass
和rm -rf node_modules
多次。
即使尝试npm install --save-dev [email protected]
建议here。
最初我使用brew
安装了节点。那是v6.2.0。我完全按照建议here删除了system
节点,然后使用nvm安装了相同的节点。
但问题仍然存在。请让我知道我在这里失踪。
你试过'npm rebuild node-sass --force'吗? – robertklep
刚刚尝试过,没有工作。 –
我可以重现这个问题,但为我解决了这个问题。 – robertklep