alibaba / weex

A framework for building Mobile cross-platform UI
https://weexapp.com/
Apache License 2.0
18.28k stars 2.13k forks source link

安装依赖执行npm install 一直报错 #2263

Closed ghost closed 3 years ago

ghost commented 7 years ago

按照快速上手教程一步步安装,执行npm install时一直报错 => npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer npm WARN deprecated native-or-bluebird@1.2.0: 'native-or-bluebird' is deprecated. Please use 'any-promise' instead.

C:\Users\jxl\Desktop\awesome-project\node_modules\canvas>if not defined npm_config_node_gyp (node "D:\software\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (D:\software\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14) gyp ERR! stack at D:\software\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15) gyp ERR! System Windows_NT 10.0.14393 gyp ERR! command "D:\software\nodejs\node.exe" "D:\software\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\jxl\Desktop\awesome-project\node_modules\canvas gyp ERR! node -v v6.3.1 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok

想问下这是什么意思?谢谢

BrickCarvingArtist commented 7 years ago

它说你电脑上没python,它要用python @jiangxinlei

Jinjiang commented 7 years ago

@jiangxinlei 你试试继续执行可不可以正常工作,我们已知了一个 npm 依赖在安装的时候会报错,但是接下来的流程可以走通,麻烦确认一下 这个已知问题我们会尽快想办法修复 谢谢

ghost commented 7 years ago

@BrickCarvingArtist 谢谢回答,安装了python,那个错误没有了,但是还有其他错误

ghost commented 7 years ago

@Jinjiang 谢谢回复,继续执行页面是可以出来的,流程是可以走的,不过二维码没有出现。

4

我在自己的笔记本win10 64位,公司电脑win7 64位都试过,前面执行都没问题,就是执行到npm install时,都会出现这样的报错, image 2

3

这时的node版本是6.9.4,

YongX commented 7 years ago

@jiangxinlei 感觉windows平台跑这些东西还是很疼的啊。 我Mac执行npm install 也出现过类似于 Failed at the canvas@1.3.16 install script 'node-gyp rebuild'. 这样的错误。后来用Mac自带的brew安装了pkg-configcairo后就OK了。 希望对你有帮助

ghost commented 7 years ago

@YongX 谢谢回答,抱歉这些天一直在出差,今天才回复,感觉有一些平台在Windows上跑确实有点问题,有时间装个mac虚拟机再试试

Jinjiang commented 7 years ago

这个问题最新的 vue-cli weex-template 已经修复了 https://github.com/Jinjiang/weex-template/tree/master/template ,换了另外一个 npm 库就好了 weex-toolkit 貌似也已经修复了,最新版本生成的项目里面不会再 npm 安装失败了,大家麻烦再确认一下 谢谢

yadgen commented 5 years ago

@jiangxinlei 感觉windows平台跑这些东西还是很疼的啊。 我Mac执行npm install 也出现过类似于 Failed at the canvas@1.3.16 install script 'node-gyp rebuild'. 这样的错误。后来用Mac自带的brew安装了pkg-configcairo后就OK了。 希望对你有帮助

你好,我也是macOS环境下出现了这个错误,由于项目原因,无法使用新版本。 目前版本是: node -v v6.14.4 node-gyp -v v3.8.0 我的package.json版本指定了安装"canvas": "1.6.6",在执行的时候,仍然安装的是canvas@1.3.16,不知道什么情况。

YorkShen commented 5 years ago

This PR/issue doesn't receive response since Weex migrated to Apache two years ago and this repository is no longer active yet.

Feel free to ask question in new repository and thanks for your contribution.

Hanks10100 commented 3 years ago

This issue is outdated for a long time and will be closed now. You can create a new one if you still have questions.