Heim  >  Fragen und Antworten  >  Hauptteil

javascript - Warum erhalte ich bei der Installation von Node-Sass mit npm immer eine Fehlermeldung?

错误代码:
gyp ERR! Fehler konfigurieren
gyp ERR! Stack-Fehler: Die ausführbare Python-Datei „Python“ kann nicht gefunden werden. Sie können die Umgebungsvariable PYT
HON festlegen.
gyp ERR! Stapel bei PythonFinder.failNoPython (C:Users***AppDataRoami
ngnpmnode_modulesnode-sassnode_modulesnode-gyplibconfigure.js:483:19)
gyp ERR! Stack bei PythonFinder.<anonymous> (C:Users***AppDataRoamin
gnpmnode_modulesnode-sassnode_modulesnode-gyplibconfigure.js:508:16)
gyp ERR! Stack bei C:Users***AppDataRoamingnpmnode_modulesnode-sa
ssnode_modulesgraceful-fspolyfills.js:284:29
gyp ERR! Stapel bei FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! Befehl „D:Program Filesnodejsnode.exe“ „C:Users*App
DataRoamingnpmnode_modulesnode-sassnode_modulesnode-gypbinnode-g
yp.js“ „rebuild“ „--verbose“ „--libsass_ext=" „--libsass_cflags=" "--libsass_ldf
lags=" "--libsass_library="
gyp ERR! cwd C:Users***AppDataRoamingnpmnode_modulesnode-sass
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! nicht ok
Build fehlgeschlagen mit Fehlercode: 1
npm ERR! Code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.3 Postinstallation: node scripts/build.js
npm ERR! Exit-Status 1
npm ERR!
npm ERR! Fehler beim Postinstallationsskript node-sass@4.5.3.
npm ERR! Dies ist wahrscheinlich kein Problem mit npm. Es gibt wahrscheinlich oben eine zusätzliche Protokollierungsausgabe.

npm ERR! Ein vollständiges Protokoll dieses Laufs finden Sie unter:

npm ERR! C:Benutzer*
**AppDataRoamingnpm-cache_logs2017-07-06T01_07_47_983Z-debug.log

求大佬指点,给大佬递茶.公司内网,代理已经配置好,不过我的权限可能有的网站和端口会访问不了,github能上,node.js官网能上,源用的是cnpm。

ringa_leeringa_lee2661 Tage vor2125

Antworte allen(4)Ich werde antworten

  • 淡淡烟草味

    淡淡烟草味2017-07-06 10:37:57

    在跟package.json同目录创一个名为.npmrc的文件,然后装个python,最好是2.X版本

    把下面这句东西放进去

    sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

    Antwort
    0
  • 三叔

    三叔2017-07-06 10:37:57

    提示是需要安装python,可以安装个python试试,然后配下PYTHON 的环境变量,重新安装试试看。

    Antwort
    0
  • 扔个三星炸死你

    扔个三星炸死你2017-07-06 10:37:57

    根目录创建.npmrc

    phantomjs_cdnurl=http://cnpmjs.org/downloads
    sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
    registry=https://registry.npm.taobao.org

    保存后 重新npm install

    Antwort
    0
  • PHP中文网

    PHP中文网2017-07-06 10:37:57

    我昨天也试过安装nodesass失败,后面转用淘宝镜像装就成功了
    $ npm install -g cnpm --registry=https://registry.npm.taobao.org (安装淘宝镜像)

    $ cnpm install node-sass --save (使用淘宝镜像安装node-sass)

    Antwort
    0
  • StornierenAntwort