Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

问卷系统案例,新的错误,cd到frontend文件执行npm install时会报错,麻烦帮忙解决 #9

Open
SoftwareMark opened this issue Apr 6, 2017 · 8 comments

Comments

@SoftwareMark
Copy link

image
李老师,这是什么错误,我的node版本都没有问题

@SoftwareMark SoftwareMark changed the title 问卷系统案例,新的错误,麻烦解决 问卷系统案例,新的错误,cd到frontend文件执行npm install时会报错,麻烦帮忙解决 Apr 6, 2017
@SoftwareMark
Copy link
Author

在angular-seed 中npm install的时候会报错

image

@ghost
Copy link

ghost commented Apr 6, 2017

报错信息很明显,你的系统里缺失 python,node-sass 模块需要 node-gyp 编译,而 node-gyp 需要依赖 pythod 环境。
可以看这里:foundation/foundation-sites#7788
下次遇到类似的问题,直接把报错信息在 Google 里搜索一般都有解决方案的。

@SoftwareMark
Copy link
Author

image
谢谢李老师,上面那个问题解决了,还有个问题,麻烦给看下

@loskael
Copy link

loskael commented Apr 7, 2017

@SoftwareMark

请检查你的 Visual Studio 版本, 参考: https://github.com/nodejs/node-gyp#installation

@loskael
Copy link

loskael commented Apr 7, 2017

简单讲一下这个问题的原因:
项目使用了 sass
-> 依赖了 node-sass
-> 依赖了 labsass(一个基于 c++写的 Sass compiler)
-> 依赖了 node-gyp (node 要使用 c++ 的扩展需要使用 node-gyp 将 c++代码编译成 node addon)
-> 依赖了 python(https://github.com/nodejs/node-gyp/tree/master/gyp) 和 gyp(https://gyp.gsrc.io/ 需翻墙)

gyp 是一个跨平台的项目构建管理工具, 在 windows 平台使用了强大的 Visual Studio

@SoftwareMark
Copy link
Author

谢谢李老师,

@SoftwareMark
Copy link
Author

image
又报了个错误,前面的解决了,后面又出现错误,,麻烦李老师

@ghost
Copy link

ghost commented Apr 10, 2017

这个信息量太小了,没办法定位问题。你试试把 elifecycle gulp 等关键字在google搜一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants