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

У меня есть ошибка, которую бросает только тогда, когда я пытаюсь установить gulp-sass. Я попытался установить другие модули (например, gulp-livereload), и они работают нормально. Использование npm версии 6.0.0. Вот раздел package.json, который требует его:

Единственное, что вызывает ошибки, — это gulp-sass. Это ошибка:

Оказывается, это не проблема разрешения. Все, что мне нужно было сделать, это добавить флаг —unsafe-perm=true . Я полагаю, что это проблема с самим postinstaller gulp-sass, судя по этому сообщению github. Спасибо vishwa за то, что указали, что разрешение отклонено, я бы никогда не нашел этот пост без него. 😉

Пытаюсь установить сборку gulp себе на диск, клонировал из репозитория, запускаю npm install , и выдаёт ошибку:

«C:Program FilesSublime Text 3sublime_text.exe. — Unexpected token P»

Sublime Text стоит редактором по умолчанию. В пользовательской переменной EDITOR находится путь, который указан в тексте ошибки. Как это можно исправить, и почему нода ругается на путь?

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

HTTP error 404 Not Found

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

or configure npm proxy via

npm config set proxy example.com:8080

> node-sass@4.11.0 postinstall C:UsersaganiDesktopGulp
ode_modules
ode-sass
> node scripts/build.js

Building: C:Program Files
odejs
ode.exe C:UsersaganiDesktopGulp
ode_modules
ode-gypin
ode-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:UsersaganiDesktopGulp
ode_moduleswhichwhich.js:13:12)
gyp verb `which` failed at F (C:UsersaganiDesktopGulp
ode_moduleswhichwhich.js:68:19)
gyp verb `which` failed at E (C:UsersaganiDesktopGulp
ode_moduleswhichwhich.js:80:29)
gyp verb `which` failed at C:UsersaganiDesktopGulp
ode_moduleswhichwhich.js:89:16
gyp verb `which` failed at C:UsersaganiDesktopGulp
ode_modulesisexeindex.js:42:5
gyp verb `which` failed at C:UsersaganiDesktopGulp
ode_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:UsersaganiDesktopGulp
ode_moduleswhichwhich.js:13:12)
gyp verb `which` failed at F (C:UsersaganiDesktopGulp
ode_moduleswhichwhich.js:68:19)
gyp verb `which` failed at E (C:UsersaganiDesktopGulp
ode_moduleswhichwhich.js:80:29)
gyp verb `which` failed at C:UsersaganiDesktopGulp
ode_moduleswhichwhich.js:89:16
gyp verb `which` failed at C:UsersaganiDesktopGulp
ode_modulesisexeindex.js:42:5
gyp verb `which` failed at C:UsersaganiDesktopGulp
ode_modulesisexewindows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:166:21) <
gyp verb `which` failed stack: ‘Error: not found: python2
at getNotFoundError ‘ +
gyp verb `which` failed ‘(C:\Users\agani\Desktop\Gulp\node_modules\which\which.js:13:12)
at F ‘ +
gyp verb `which` failed ‘(C:\Users\agani\Desktop\Gulp\node_modules\which\which.js:68:19)
at E ‘ +
gyp verb `which` failed ‘(C:\Users\agani\Desktop\Gulp\node_modules\which\which.js:80:29)
at ‘ +
gyp verb `which` failed ‘C:\Users\agani\Desktop\Gulp\node_modules\which\which.js:89:16
at ‘ +
gyp verb `which` failed ‘C:\Users\agani\Desktop\Gulp\node_modules\isexe\index.js:42:5
at ‘ +
gyp verb `which` failed ‘C:\Users\agani\Desktop\Gulp\node_modules\isexe\windows.js:36:5
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:UsersaganiDesktopGulp
ode_modules
ode-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:UsersaganiAppDataRoaming
pm-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

  • Вопрос задан 24 апр.
  • 368 просмотров

On Windows
Option 1
Install all the required tools and configurations using Microsoft’s windows-build-tools using npm install —global —production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

Option 2
Install tools and configuration manually:

Install Visual C++ Build Environment: Visual Studio Build Tools (using «Visual C++ build tools» workload) or Visual Studio 2017 Community (using the «Desktop development with C++» workload)
Install Python 2.7 (v3.x.x is not supported), and run npm config set python python2.7 (or see below for further instructions on specifying the proper Python version and path.)
Launch cmd, npm config set msvs_version 2017

а в логах говорится, что он нашел третий питон

Оцените статью