in visual studio, gulp not running convert scss
files css
.
the error i'm getting is:
cmd.exe /c gulp --tasks-simple c:\users\sam\documents\visual studio 2017\projects\myproject\myproject\node_modules\node-sass\lib\binding.js:15 throw new error(errors.missingbinary()); ^ error: missing binding c:\users\sam\documents\visual studio 2017\projects\myproject\myproject\node_modules\node-sass\vendor\win32-x64-47\binding.node node sass not find binding current environment: windows 64-bit node.js 5.x found bindings following environments: - windows 64-bit node.js 7.x happens because environment has changed since running
npm install
. runnpm rebuild node-sass
build binding current environment.
i did run npm rebuild node-sass
in root of project folder still getting same error. got after running npm rebuild node-sass
:
binary found @ c:\users\sam\documents\visual studio 2017\projects\myproject\myproject\node_modules\node-sass\vendor\win32-x64-51\binding.node testing binary binary fine node-sass@3.13.1 c:\users\sam\documents\visual studio 2017\projects\myproject\myproject\node_modules\node-sass
my gulpfile.js
looks this:
var gulp = require('gulp'), sass = require("gulp-sass");; gulp.task('default', function () { // place code default task here }); gulp.task("sass", function () { return gulp.src('wwwroot/scss/style.scss') .pipe(sass()) .pipe(gulp.dest('wwwroot/css')); });
any idea how can fix issue?
update: if run node -v
in command line, v7.10.0
.
also, found article , followed instructions issue still not resolved , i'm seeing issue bower in project. here's article: https://ryanhayes.net/synchronize-node-js-install-version-with-visual-studio-2015/
and here's i'm seeing in project:
if click "manage bower packages" in visual studio, tries , tries can't seem find installed packages.
update 2:
here's `package.json':
{ "name": "ingrid", "version": "1.0.0", "description": "ingrid frontend", "scripts": { "start": "webpack-dev-server --port 43131", "build": "webpack", "build-production": "webpack --process -p" }, "dependencies": { "chart.js": "^2.1.6", "filepicker-js": "^2.4.14", "fine-uploader": "^5.14.2", "fine-uploader-wrappers": "1.0.0", "immutable": "^3.7.6", "imports-loader": "^0.6.5", "moment": "^2.14.1", "object-assign": "4.1.1", "react": "^15.5.4", "react-addons": "^0.9.0", "react-addons-css-transition-group": "^15.5.2", "react-chartjs": "^0.7.3", "react-dom": "^15.5.4", "react-flip-move": "^2.4.1", "react-masonry-component": "^4.1.0", "react-perfect-scrollbar": "^0.1.1", "react-redux": "^4.4.0", "react-tinymce": "^0.4.0", "redux": "^3.3.1", "redux-thunk": "^1.0.3", "tinymce": "^4.4.0" }, "devdependencies": { "babel-cli": "6.23.0", "babel-core": "^6.24.1", "babel-eslint": "7.2.0", "babel-loader": "6.4.1", "babel-plugin-rewire": "1.0.0", "babel-polyfill": "^6.9.0", "babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.5.0", "babel-preset-stage-2": "^6.22.0", "babel-plugin-syntax-class-properties": "6.13.0", "babel-plugin-transform-class-properties": "6.23.0", "babel-plugin-transform-object-rest-spread": "6.23.0", "css-loader": "0.27.3", "es6-promise": "4.1.0", "eslint": "3.18.0", "eslint-plugin-react": "6.10.3", "extract-text-webpack-plugin": "2.1.0", "exports-loader": "^0.6.3", "gulp": "3.8.11", "gulp-concat": "2.5.2", "gulp-cssmin": "0.1.7", "gulp-sass": "^2.3.2", "gulp-uglify": "1.2.0", "pica": "2.0.8", "react-hot-loader": "^1.3.0", "rimraf": "2.2.8", "style-loader": "^0.18.1", "webpack": "^2.6.1", "webpack-node-externals": "^1.6.0", "webpack-dev-server": "^2.4.5", "whatwg-fetch": "^1.0.0" } }
cnpm install gulp-load-plugins --save-dev
and modify gulpfile
var gulp = require('gulp'), sass = require("gulp-sass"), gulploadplugins = require('gulp-load-plugins'), $ = gulploadplugins(); gulp.task('default', function () { // place code default task here }); gulp.task("sass", function () { return gulp.src('wwwroot/scss/style.scss') .pipe($.sass()) .pipe(gulp.dest('wwwroot/css')); });
Comments
Post a Comment