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

第十四章 angular-seed 安装启动部分有问题 #24

Closed
KevinZhang111 opened this issue Apr 12, 2017 · 4 comments
Closed

第十四章 angular-seed 安装启动部分有问题 #24

KevinZhang111 opened this issue Apr 12, 2017 · 4 comments
Labels

Comments

@KevinZhang111
Copy link

KevinZhang111 commented Apr 12, 2017

  1. 第374页 的下载angular-seed 项目的命令有误。现在git 的clone命令,需要把url 放在最后。 git clone [] [--] [

    ], 书上给的命令是无法使用的。

  2. 下载完angular-seed 项目,执行 npm install 命令后,会看到以下错误信息:
    npm ERR! Windows_NT 10.0.10586
    npm ERR! argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
    npm ERR! node v6.10.1
    npm ERR! npm v3.10.10
    npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.13.1 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.13.1 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, 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! D:\Code\Angular 2\angular2-questionnaire\frontend\npm-debug.log

此时node_modules 文件夹已经生成。

执行npm start 命令后,启动失败,看到如下错误信息:

[09:59:36] Error: Cannot find module '.tmp/Rx.min.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.resolve (internal/module.js:27:19)
at D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:617:59
at Array.forEach (native)
at normalizeDependencies (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:617:6)
at ProjectConfig.get [as DEPENDENCIES] (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:326:12)
at getExternalCss (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:139:16)
at getExternalCssStream (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:131:19)
at processExternalCss (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:163:10)
at processExternalStylesheets (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:112:65)
[09:59:36] 'serve.dev' errored after 5.36 s
[09:59:36] Error in plugin 'run-sequence(build.html_css)'
Message:
Cannot find module '.tmp/Rx.min.js'
Details:
code: MODULE_NOT_FOUND
Stack:
Error: Cannot find module '.tmp/Rx.min.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.resolve (internal/module.js:27:19)
at D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:617:59
at Array.forEach (native)
at normalizeDependencies (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:617:6)
at ProjectConfig.get [as DEPENDENCIES] (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:326:12)
at getExternalCss (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:139:16)
at getExternalCssStream (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:131:19)
at processExternalCss (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:163:10)
at processExternalStylesheets (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:112:65)
[09:59:36] 'build.dev' errored after 5.38 s
[09:59:36] Error in plugin 'run-sequence(serve.dev)'
Message:
Cannot find module '.tmp/Rx.min.js'
Details:
code: MODULE_NOT_FOUND
Stack:
Error: Cannot find module '.tmp/Rx.min.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.resolve (internal/module.js:27:19)
at D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:617:59
at Array.forEach (native)
at normalizeDependencies (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:617:6)
at ProjectConfig.get [as DEPENDENCIES] (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:326:12)
at getExternalCss (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:139:16)
at getExternalCssStream (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:131:19)
at processExternalCss (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:163:10)
at processExternalStylesheets (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:112:65)
[09:59:36] 'build.dev' errored after 5.41 s
[09:59:36] Error in plugin 'run-sequence(build.html_css)'
Message:
Cannot find module '.tmp/Rx.min.js'
Details:
code: MODULE_NOT_FOUND
Stack:
Error: Cannot find module '.tmp/Rx.min.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.resolve (internal/module.js:27:19)
at D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:617:59
at Array.forEach (native)
at normalizeDependencies (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:617:6)
at ProjectConfig.get [as DEPENDENCIES] (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\config\seed.config.ts:326:12)
at getExternalCss (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:139:16)
at getExternalCssStream (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:131:19)
at processExternalCss (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:163:10)
at processExternalStylesheets (D:\Code\Angular 2\angular2-questionnaire\frontend\tools\tasks\seed\build.html_css.ts:112:65)

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.10.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! angular-seed@0.0.0 start: gulp serve.dev --color
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-seed@0.0.0 start script 'gulp serve.dev --color'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-seed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp serve.dev --color
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-seed
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-seed
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\Code\Angular 2\angular2-questionnaire\frontend\npm-debug.log

node 和 npm 的版本如下:
node v6.10.1
npm v3.10.10
因为我在运行angular官网的例子是可以成功的。想请教一下,不知道是git上这个代码包里少文件,还是我的计算机哪里配置有问题。万望不吝赐教,十分感谢!

@ghost
Copy link

ghost commented Apr 12, 2017

国内安装node-sass是比较尴尬,可以采取科学安装法:lmk123/blog#28
对于window用户,评论里有说明:
image

@KevinZhang111
Copy link
Author

使用上述命令在windows系统下,用cmd或者PowerShell 安装node-sass均失败。但是使用Git Bash 安装则成功。不知为何。多谢老师的指导。

@loskael
Copy link

loskael commented Apr 17, 2017

cmd 不支持 SASS_BINARY_SITE 这种方式设置环境变量

@ghost ghost added the Q&A label Oct 17, 2017
@ghost
Copy link

ghost commented Oct 18, 2017

No response. Closed !

@ghost ghost closed this as completed Oct 18, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants