Gulp sass ошибка установки

Здраствуйте! Хотел описать проблему. При установке пакета gulp-sass вылезает ошибка.Установка выполняется через node.js командой npm i gulp-sass. Вот весь вывод после ввода команды.
> node-sass@4.11.0 install C:UsersaganiDesktopGulpnode_modulesnode-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/downloa…
Cannot download «https://github.com/sass/node-sass/releases/downloa…»:

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.

export HTTP_PROXY=example.com:1234

or configure npm proxy via

npm config set proxy example.com:8080

> node-sass@4.11.0 postinstall C:UsersaganiDesktopGulpnode_modulesnode-sass
> node scripts/build.js

Building: C:Program Filesnodejsnode.exe C:UsersaganiDesktopGulpnode_modulesnode-gypbinnode-gyp.js rebuild —verbose —libsass_ext= —libsass_cflags= —libsass_ldflags= —libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli ‘C:\Program Files\nodejs\node.exe’,
gyp verb cli ‘C:\Users\agani\Desktop\Gulp\node_modules\node-gyp\bin\node-gyp.js’,
gyp verb cli ‘rebuild’,
gyp verb cli ‘—verbose’,
gyp verb cli ‘—libsass_ext=’,
gyp verb cli ‘—libsass_cflags=’,
gyp verb cli ‘—libsass_ldflags=’,
gyp verb cli ‘—libsass_library=’
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@12.0.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing «build» directory
gyp verb command configure []
gyp verb check python checking for Python executable «python2» in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:UsersaganiDesktopGulpnode_moduleswhichwhich.js:13:12)
gyp verb `which` failed at F (C:UsersaganiDesktopGulpnode_moduleswhichwhich.js:68:19)
gyp verb `which` failed at E (C:UsersaganiDesktopGulpnode_moduleswhichwhich.js:80:29)
gyp verb `which` failed at C:UsersaganiDesktopGulpnode_moduleswhichwhich.js:89:16
gyp verb `which` failed at C:UsersaganiDesktopGulpnode_modulesisexeindex.js:42:5
gyp verb `which` failed at C:UsersaganiDesktopGulpnode_modulesisexewindows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:166:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:UsersaganiDesktopGulpnode_moduleswhichwhich.js:13:12)
gyp verb `which` failed at F (C:UsersaganiDesktopGulpnode_moduleswhichwhich.js:68:19)
gyp verb `which` failed at E (C:UsersaganiDesktopGulpnode_moduleswhichwhich.js:80:29)
gyp verb `which` failed at C:UsersaganiDesktopGulpnode_moduleswhichwhich.js:89:16
gyp verb `which` failed at C:UsersaganiDesktopGulpnode_modulesisexeindex.js:42:5
gyp verb `which` failed at C:UsersaganiDesktopGulpnode_modulesisexewindows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:166:21) {
gyp verb `which` failed stack: ‘Error: not found: python2n at getNotFoundError ‘ +
gyp verb `which` failed ‘(C:\Users\agani\Desktop\Gulp\node_modules\which\which.js:13:12)n at F ‘ +
gyp verb `which` failed ‘(C:\Users\agani\Desktop\Gulp\node_modules\which\which.js:68:19)n at E ‘ +
gyp verb `which` failed ‘(C:\Users\agani\Desktop\Gulp\node_modules\which\which.js:80:29)n at ‘ +
gyp verb `which` failed ‘C:\Users\agani\Desktop\Gulp\node_modules\which\which.js:89:16n at ‘ +
gyp verb `which` failed ‘C:\Users\agani\Desktop\Gulp\node_modules\isexe\index.js:42:5n at ‘ +
gyp verb `which` failed ‘C:\Users\agani\Desktop\Gulp\node_modules\isexe\windows.js:36:5n at ‘ +
gyp verb `which` failed ‘FSReqCallback.oncomplete (fs.js:166:21)’,
gyp verb `which` failed code: ‘ENOENT’
gyp verb `which` failed }
gyp verb check python checking for Python executable «python» in the PATH
gyp verb `which` succeeded python C:UsersaganiAppDataLocalProgramsPythonPython37-32python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:UsersaganiAppDataLocalProgramsPythonPython37-32python.EXE -c import sys; print «%s.%s.%s» % sys.version_info[:3];
gyp ERR! stack File «», line 1
gyp ERR! stack import sys; print «%s.%s.%s» % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:304:12)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1000:16)
gyp ERR! stack at Socket. (internal/child_process.js:405:11)
gyp ERR! stack at Socket.emit (events.js:196:13)
gyp ERR! stack at Pipe. (net.js:586:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command «C:\Program Files\nodejs\node.exe» «C:\Users\agani\Desktop\Gulp\node_modules\node-gyp\bin\node-gyp.js» «rebuild» «—verbose» «—libsass_ext=» «—libsass_cflags=» «—libsass_ldflags=» «—libsass_library=»
gyp ERR! cwd C:UsersaganiDesktopGulpnode_modulesnode-sass
gyp ERR! node -v v12.0.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN my@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {«os»:»darwin»,»arch»:»any»} (current: {«os»:»win32″,»arch»:»x64″})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.11.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.11.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersaganiAppDataRoamingnpm-cache_logs2019-04-24T15_57_27_492Z-debug.log
P.S.
Заметил что-то связаное с python:
stack Error: Command failed: C:UsersaganiAppDataLocalProgramsPythonPython37-32python.EXE -c import sys; print «%s.%s.%s» % sys.version_info[:3];
И то что проблема не с node.js

When I compile with gulp, I got an error like below. How can I fix it?

module.js:339
throw err;
^
Error: Cannot find module 'gulp-sass'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/flyscoot.com/gulpfile.js:2:12)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)

Eje's user avatar

Eje

3544 silver badges8 bronze badges

asked Oct 24, 2015 at 4:39

Htet Win's user avatar

Just do npm update and then npm install gulp-sass --save-dev in your root folder, and then when you run you shouldn’t have any issues.

answered Mar 6, 2016 at 14:32

Dhruv Ghulati's user avatar

Dhruv GhulatiDhruv Ghulati

2,9763 gold badges33 silver badges51 bronze badges

2

Did you check this question?

May be possible solution is:

rm -rf node_modules/
npm install

Community's user avatar

answered Nov 9, 2015 at 23:33

vtokmak's user avatar

vtokmakvtokmak

1,4966 gold badges35 silver badges66 bronze badges

3

I had the same problem, and I resolve doing this npm update. But I receive the message about permission, so I run:

sudo chwon -R myuser /home/myUserFolder/.config

This set permissions for my user run npm comands like administrator. Then I run this again:

npm update 

and this:

npm install gulp-sass

Then my problem with this was solved.

Eje's user avatar

Eje

3544 silver badges8 bronze badges

answered Jan 8, 2018 at 13:45

Milton Jacomini Neto's user avatar

Try this:

npm install -g gulp-sass

or

npm install --save gulp-sass

MLavoie's user avatar

MLavoie

9,63141 gold badges36 silver badges56 bronze badges

answered Aug 27, 2018 at 11:09

maheshSilva's user avatar

I had same error on Ubuntu 18.04

Delete your node_modules folder and run

sudo npm install --unsafe-perm=true

answered Jan 22, 2019 at 7:58

moonbyt3's user avatar

0

Make sure python is installed on your machine, Python is required for node-sass.

answered Oct 26, 2020 at 5:05

Sushil Kumar's user avatar

Sushil KumarSushil Kumar

1,3632 gold badges13 silver badges27 bronze badges

1

I had this issue for days looking for answers. My error log was similar to this npm just won’t install node sass
The only problem was the node version. Maybe it can help some of you.

I downgraded my Node.js from 9.3.0 to 6.12.2 and run:

npm update

answered Dec 26, 2017 at 18:49

Ray Macz's user avatar

Ray MaczRay Macz

852 silver badges9 bronze badges

In the root folder where package.json is located, run npm outdated. You’ll get outdated packages returned with some details. In those details, you’ll see the current version number of the outdated package.

After then, open the package.json file and manually change the version number of the corresponding package.

Then delete the node_modules folder and run npm install. It should solve this issue.

answered Oct 11, 2018 at 13:18

Saabbir's user avatar

SaabbirSaabbir

5786 silver badges8 bronze badges

I ran : npm i gulp-sass@latest --save-dev

That did the magic for me

answered Dec 4, 2020 at 17:54

bamms's user avatar

bammsbamms

174 bronze badges

Ive faced the same troubles with gulp-sass in my VSCode environment.
Also, I was observing a lot of fails during npm installing and I could not start gulp (as outcome).
The way how I fixed it:

  • delete packages
  • npm i
  • npm i gulp-sass --save-dev

Now it works.

answered Mar 25, 2021 at 19:43

Lotpite's user avatar

LotpiteLotpite

3262 silver badges4 bronze badges

I followed the doc to migrating to version 5.

npm install sass gulp-sass --save-dev

It’s worked for me

node -v => v19.8.1
npm -v => 9.5.1

answered Apr 14 at 14:18

Martino's user avatar

1

Those who are getting this error, please downgrade the Node.js you are using.

  • Step 1 :

    Uninstall the one you are using and install the version you prefer. I installed v6.12.3. My previous Node.js version was v9.4.0.

  • Step 2 :

    Download Node.js.

Hope this will work.

Community's user avatar

answered Jan 24, 2018 at 14:05

User_3535's user avatar

User_3535User_3535

8161 gold badge13 silver badges30 bronze badges

I worked with Yarn and I got the same issue and I solve it doing this:

delete node_modules
yarn install
yarn upgrade

yarn install gulp-sass --save-dev

answered May 21, 2020 at 22:55

jozef koko's user avatar

Try this to fix the error:

  1. Delete node_modules directory.
  2. Run npm i gulp-sass@latest --save-dev

answered Dec 21, 2020 at 18:12

Harshit's user avatar

HarshitHarshit

1,51017 silver badges42 bronze badges

Solution:

  1. const sass = require(‘gulp-sass’)(require(‘sass’));
  2. npm install gulp-sass sass

answered Jun 25, 2022 at 14:12

Mykhailo's user avatar

I’m trying to learn how to use gulp / sass / and all the other fun tools with Nodejs and I’m having an issue installing gulp-sass. The process I’m using to install everything is:

1.  Start Git Bash in the project folder
2.  npm init
3.  npm install gulp -g
4.  npm install gulp --save-dev
5.  npm install gulp-sass <- this is where I get errors

Once I get to step five, I get the following error:

$ npm install gulp-sass
npm WARN package.json project@1.0.0 No repository field.
npm WARN package.json project@1.0.0 No README data
-
> node-sass@3.2.0 install     \primaryhomemendsleyprofileDesktopprojectnode_modulesgulp-  sassnode_modulesnode-sass
> node scripts/install.js

'\primaryhomemendsleyprofileDesktopprojectnode_modulesgulp-   sassnode_modulesnode-sass'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
module.js:338
throw err;
      ^
Error: Cannot find module 'C:Windowsscriptsinstall.js'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\Program Files\nodejs\node.exe"     "c:\Users\mendsley\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js"     "install" "gulp-sass"
npm ERR! node v0.12.1
npm ERR! npm  v2.13.1
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.2.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.2.0 install script 'node scripts/install.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     \primaryhomemendsleyprofileDesktopprojectnpm-debug.log

I’m trying this on my work computer, so I’m not sure if that matters. The system admin says there should not be any issue and other people have no issue with same package…and talking to them, they offer no help. I tried everything on my personal laptop and gulp-sass installs just fine, so it is something with my work pc.

My initial thought is it’s a path issue, but then why do other packages install okay?

I did uninstall/reinstall Nodejs, but that didn’t help.

Does anyone have an idea?

Thanks in advance!

Comments

@jaegz

saper

added a commit
to saper/npm
that referenced
this issue

Aug 11, 2015

@saper

/d disables cmd.exe AutoRuns feature,
   where registry entry points to the
   script that will be executed when cmd.exe
   starts. Surprisingly a lot of users
   hase "CD " or similar command there
   which causes lifecycle scripts to fail,
   since relative path to the script no longer
   works (and package.json has no way to deduce
   absolute path)

/s enables handling of quotes, so that you
   can have "C:Program FilesNodenode.exe" quoted
   in your script. Node's child_process.exec()
   is doing the same. We prevent additional quoting
   by libuv already by setting uv_spawn() flag
   UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS.

If those flags are not set there is no way
package.json can reliably tell us to run "node"
executable with a relative script path:

    "scripts": {
      "install": "node scripts/install.js"
    }

Without /d "node" invocation may end up
in a random directory as a result of
the AutoRuns command.

Fixes:
    npm#8751
    npm#7333
    sass/node-sass#1027
    sass/node-sass#1012
    sass/node-sass#659
    sass/node-sass#603

@sass
sass

locked as resolved and limited conversation to collaborators

Jan 30, 2018

  • Главная
  • Вопросы

Здравствуйте! Прохожу урок https://beonmax.com/courses/web-razrabotchik/gulp-planirovschik-zadach/ , при запуске gulp после установки всех плагинов в терминале выдается ошибка:

«

[14:12:55] Using gulpfile ~DesktopверсткаUbergulpfile.js
[14:12:55] Starting ‘default’…
[14:12:55] Starting ‘watch’…
[14:12:55] Starting ‘server’…
[14:12:55] Starting ‘styles’…

Error in plugin «gulp-sass»
Message:

gulp-sass 5 does not have a default Sass compiler; please set one yourself.
Both the `sass` and `node-sass` packages are permitted.
For example, in your gulpfile:

var sass = require(‘gulp-sass’)(require(‘sass’));

[14:12:55] The following tasks did not complete: default, watch, server, styles
[14:12:55] Did you forget to signal async completion?

«

Из фразы gulp-sass 5 does not have a default Sass compiler; please set one yourself понимаю, что нужно установить компилер, подскажите, пожалуйста, как это правильно сделать и исправить ошибку? Хочется дальше продолжать полноценное обучение по курсу.

Ирина Белоусова

1 year ago


  • Активные
  • Старые
  • Голоса

Добрый день. Буквально несколько дней назад пакет gulp-sass обновился и требует чуть другой настройки (уже поместили в документацию)

Для исправления ошибки установите сначала пакет sass через команду

npm i sass —save-dev

Дальше в gulpfile измените аналогичную строку на

const sass        = require(‘gulp-sass’)(require(‘sass’));

Иван Петриченко

1 year ago


Сработало, спасибо большое, Иван, за помощь и, в целом, за ваши курсы!) Буду продолжать обучение. 

Ирина Белоусова

1 year ago


2 ответов

Возможно, вам также будет интересно:

  • Guitar rig 6 ошибка при запуске
  • Haier e06 кондиционер ошибка
  • Guitar rig 5 ошибка при установке no previous installation found
  • Haier cfd633cx ошибка alarm
  • Guitar pro критическая ошибка

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии