4

This is also currently biting my project, which uses gulp-sass. gulp-sass depends on node-sass#^3.4.1 which just automatically updated to 3.5.3 which is a breaking release.

I have degraded my gulp sass version to the older(2.1.0) by updating the package.json file but its still breaking.

how to go back to node sass 3.4.2?

Error Message

Error: You may not @extend an outer selector from within @media. You may only @extend selectors within the same directive.

{
  "version": "1.0.0",
  "name": "abcd",
  "devDependencies": {
     "bower": "^1.3.12",
    "express": "^4.12.3",
    "gulp": "^3.8.10",
    "gulp-autoprefixer": "^2.1.0",
    "gulp-bower": "^0.0.7",
    "gulp-concat": "^2.5.2",
    "gulp-install": "^0.4.0",
    "gulp-livereload": "^3.8.0",
    "gulp-minify-css": "^1.0.0",
    "gulp-plumber": "^1.0.0",
    "gulp-sass": "2.1.0",
    "gulp-sourcemaps": "^1.5.1",
    "gulp-uglify": "^1.1.0"
  },
  "dependencies": {
    "jquery": "1.11.1"
  }
}
Sudipto Sarkar
  • 346
  • 2
  • 11

1 Answers1

6

Looks like a new version was just released that allows the "buggy" version of node-sass but you can always npm shrinkwrap specific sub-dependencies to a specific version if you need to - assuming that the primary package is compatible with that dependency version.

This will lock the node-sass version in gulp-sass to 3.4.2:

{
  "name": "yourprojectname",
  "version": "1.0.0",
  "dependencies": {
    "gulp-sass": {
      "version": "2.3.1",
      "from": "gulp-sass@>=2.3.1 <3.0.0",
      "resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-2.3.1.tgz",
      "dependencies": {
        "node-sass": {
          "version": "3.4.2"
        }
      }
    }
  }
}

Make sure you delete your node_modules npm cache clean to clear your locally cached packages before running npm install again.

steveax
  • 17,527
  • 6
  • 44
  • 59
  • steveax I think its going to work.But can you help me fit this dependency in my package json I mentioned above – Sudipto Sarkar Apr 23 '16 at 17:38
  • 1
    @SudiptoSarkar, that JSON block above doesn't go into your `package.json` but rather in `npm-shrinkwrap.json` (at the same level as your `package.json`). – steveax Apr 23 '16 at 19:06
  • Thanks steveax,that worked like a charm and you know what it irrespective of whatever is there in my npm cache,i did not even had to run npm cache clean!! – Sudipto Sarkar Apr 24 '16 at 09:04
  • So i'm fairly new to this stack and i can't get shrinkwrap to work, i did an npm install to install all the dependancies and then npm install shrinkwrap but when i run command npm shrinkwrap i get the following error: extraneous: shrinkwrap@0.4.0 C:\dev\xxxx\node_modules\shrinkwrap – Joshy Jul 18 '16 at 07:56
  • It's good way but I get error: Invalid dependency: gulp-sass {"version":"2.3.1","from":"gulp-sass@>=2.3.1 <3.0.0","resolved":"registry.npmjs.org/gulp-sass/-/…;:{"node‌​-sass":{"version":"3‌​.4.2"}}} – Parhum Sep 24 '16 at 12:09