由于节点模块不足,基础安装无法正常工作?

时间:2018-09-05 04:53:57

标签: html node.js zurb-foundation node-modules node-gyp

我第一次来这里。

我正在尝试通过ZURB安装foundation-sites。我过去曾经使用过它,但是现在我一直想找出很长一段时间的错误。

我认为我可能已经做了一些事情来搞砸我的Node安装或其他事情,但是我不确定。我将向大家展示当我尝试使用基础CLI进行安装时从终端中获得的信息。

    λ foundation -v                                                                                                                                          
Foundation CLI version 2.2.5                                                                                                                             
J. Clark@JC-PC ~/documents/projects/godaddyv2 (master)                                                                                                   
λ foundation new                                                                                                                                         
? What are you building today? A website (Foundation for Sites)                                                                                          
? What's the project called? (no spaces) godaddyv2                                                                                                       
? Which template would you like to use? Basic Template: includes a Sass compiler                                                                         

            .                                                                                                                                            
           /|     ,                                                                                                                                      
      , /|/  \/| /|       Thanks for using ZURB Foundation for Sites!                                                                                    
     /|/       |/ |       -------------------------------------------                                                                                    
 |___|            |___|   Let's set up a new project.                                                                                                    
 \___|  ^^   ^^   |___/   It shouldn't take more than a minute.                                                                                          
     | -[O]--[O]- |                                                                                                                                      
     |    ___,    |                                                                                                                                      
     |    ...     |                                                                                                                                      
      \__________/                                                                                                                                       


Downloading the project template...                                                                                                                      
Done downloading!                                                                                                                                        

Installing dependencies...                                                                                                                               

-                                                                                                                                                        
> node-sass@3.13.1 install C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass                        
> node scripts/install.js                                                                                                                                

Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-64_binding.node                                            
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-64_binding.node":                                                 

HTTP error 404 Not Found                                                                                                                                 

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

      export HTTP_PROXY=http://example.com:1234                                                                                                          

or configure npm proxy via                                                                                                                               

      npm config set proxy http://example.com:8080                                                                                                       

> node-sass@3.13.1 postinstall C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass                    
> node scripts/build.js                                                                                                                                  

Building: C:\Program Files\nodejs\node.exe C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_mo
dules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=                                  
gyp info it worked if it ends with ok                                                                                                                    
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',                                                                                                    
gyp verb cli   'C:\\Users\\J. Clark\\documents\\projects\\godaddyv2\\godaddyv2\\node_modules\\gulp-sass\\node_modules\\node-sass\\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 info using node-gyp@3.8.0                                                                                                                            
gyp info using node@10.9.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:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\n
ode_modules\node-gyp\node_modules\which\which.js:13:12)                                                                                                  
gyp verb `which` failed     at F (C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_modules\nod
e-gyp\node_modules\which\which.js:68:19)                                                                                                                 
gyp verb `which` failed     at E (C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_modules\nod
e-gyp\node_modules\which\which.js:80:29)                                                                                                                 
gyp verb `which` failed     at C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-g
yp\node_modules\which\which.js:89:16                                                                                                                     
gyp verb `which` failed     at C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-g
yp\node_modules\which\node_modules\isexe\index.js:42:5                                                                                                   
gyp verb `which` failed     at C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-g
yp\node_modules\which\node_modules\isexe\windows.js:36:5                                                                                                 
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)                                                                                       
gyp verb `which` failed  python2 { Error: not found: python2                                                                                             
gyp verb `which` failed     at getNotFoundError (C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\n
ode_modules\node-gyp\node_modules\which\which.js:13:12)                                                                                                  
gyp verb `which` failed     at F (C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_modules\nod
e-gyp\node_modules\which\which.js:68:19)                                                                                                                 
gyp verb `which` failed     at E (C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_modules\nod
e-gyp\node_modules\which\which.js:80:29)                                                                                                                 
gyp verb `which` failed     at C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-g
yp\node_modules\which\which.js:89:16                                                                                                                     
gyp verb `which` failed     at C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-g
yp\node_modules\which\node_modules\isexe\index.js:42:5                                                                                                   
gyp verb `which` failed     at C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass\node_modules\node-g
yp\node_modules\which\node_modules\isexe\windows.js:36:5                                                                                                 
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)                                                                                       
gyp verb `which` failed   stack:                                                                                                                         
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (C:\\Users\\J. Clark\\documents\\projects\\godaddyv2\\godaddyv2\\node_modu
les\\gulp-sass\\node_modules\\node-sass\\node_modules\\node-gyp\\node_modules\\which\\which.js:13:12)\n    at F (C:\\Users\\J. Clark\\documents\\projects
\\godaddyv2\\godaddyv2\\node_modules\\gulp-sass\\node_modules\\node-sass\\node_modules\\node-gyp\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Use
rs\\J. Clark\\documents\\projects\\godaddyv2\\godaddyv2\\node_modules\\gulp-sass\\node_modules\\node-sass\\node_modules\\node-gyp\\node_modules\\which\\w
hich.js:80:29)\n    at C:\\Users\\J. Clark\\documents\\projects\\godaddyv2\\godaddyv2\\node_modules\\gulp-sass\\node_modules\\node-sass\\node_modules\\no
de-gyp\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\J. Clark\\documents\\projects\\godaddyv2\\godaddyv2\\node_modules\\gulp-sass\\node_modules
\\node-sass\\node_modules\\node-gyp\\node_modules\\which\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\J. Clark\\documents\\projects\\godaddyv2\
\godaddyv2\\node_modules\\gulp-sass\\node_modules\\node-sass\\node_modules\\node-gyp\\node_modules\\which\\node_modules\\isexe\\windows.js:36:5\n    at F
SReqWrap.oncomplete (fs.js:152:21)',                                                                                                                     
gyp verb `which` failed   code: 'ENOENT' }                                                                                                               
gyp verb check python checking for Python executable "python" in the PATH                                                                                
gyp verb `which` succeeded python C:\Users\J. Clark\AppData\Local\Programs\Python\Python37-32\python.EXE                                                 
gyp ERR! configure error                                                                                                                                 
gyp ERR! stack Error: Command failed: C:\Users\J. Clark\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.versio
n_info[:3];                                                                                                                                              
gyp ERR! stack   File "<string>", 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:289:12)                                                                                 
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)                                                                                               
gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)                                                                                      
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)                                                              
gyp ERR! System Windows_NT 10.0.17134                                                                                                                    
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\J. Clark\\documents\\projects\\godaddyv2\\godaddyv2\\node_modules\\gulp-sass\\node_mod
ules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_lib
rary="                                                                                                                                                   
gyp ERR! cwd C:\Users\J. Clark\documents\projects\godaddyv2\godaddyv2\node_modules\gulp-sass\node_modules\node-sass                                      
gyp ERR! node -v v10.9.0                                                                                                                                 
gyp ERR! node-gyp -v v3.8.0                                                                                                                              
gyp ERR! not ok                                                                                                                                          
Build failed with error code: 1                                                                                                                          

There were some problems during the installation.                                                                                                        

 ✓ New project folder created.                                                                                                                           
 ✗ Node modules not installed. Try running npm install manually.                                                                                         
 ✓ Bower components installed.                                                                                                                           

Once you've resolved the above issues, run foundation watch while inside the godaddyv2 folder.   

非常感谢您为解决此问题提供的帮助。我似乎找不到其他遇到此问题的人,这已经困扰了我一段时间了

1 个答案:

答案 0 :(得分:0)

node-gyp是需要Python 2的构建工具。

对于Windows,您必须运行npm i -g windows-build-tools --production才能安装它以及此类构建工具的所有其他依赖项。