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

scrat init 找不到 /Users/me/.scrat-tmp/init/webapp/_gitignore #62

Closed
ian4hu opened this issue Apr 19, 2016 · 5 comments
Closed

scrat init 找不到 /Users/me/.scrat-tmp/init/webapp/_gitignore #62

ian4hu opened this issue Apr 19, 2016 · 5 comments

Comments

@ian4hu
Copy link

ian4hu commented Apr 19, 2016

[ian@ian-mbp /tmp/git/front]$ scrat -v


         `-:////:-`                        
      ./ossssssssss+-                      
    -+sssssssssssssss+`                    
   .-...-+ssssssssssss/        .`          
          :ssssssssssso`      -o+`         
          .ossssssssss/       +ss+-.       
         `+ssssssssss+`     ./osssss+:`    
        -ossssssssso:` `.-/ossssssssss+`   
      .+sssssssss+:`  `.--:/+osssssssss/   
    `:osssssso+:``.-::/+++/-.`.:+ossssso`  
   `+sssssso:``-:/+//:-`.:+sso/-``.-::-.   
   :ssssss/`.//:---:/oso+-`.+sssoo+//:-`   
  `osssss/ `.``-:::-``.+ss+. :osssso//::`  
  `osssso.  `/osoooso/` /sso. `...`        
   /sssso. `+ss:```/ss/ `oss/              
   `+ssss: `oso.   -ss+ `oss/              
    `/ssso. -oso+/+oso. -sss:              
      ./oso/``-/+o+/-``:osss+/:-`          
        `.-//:.`   `.:++++++++//:`         

              v0.6.0

[ian@ian-mbp /tmp/git/front]$ scrat init
[?] Your project name: toolkit
[?] Your project version: 1.0.0
[?] What type of scrat project to init? webapp

     info ... Fetching https://codeload.github.com/scrat-team/scrat-template-webapp/tar.gz/master ...
     info This might take a few moments
..
✔ Done in /Users/ian/.scrat-tmp/init/webapp

/usr/local/lib/node_modules/.scrat_npminstall/yeoman-generator/0.17.7/yeoman-generator/lib/actions/actions.js:191
    throw new Error('Unable to read "' + filepath + '" file (Error code: ' + e.code + ').');
    ^

Error: Unable to read "/Users/ian/.scrat-tmp/init/webapp/_gitignore" file (Error code: ENOENT).
    at Generator.read (/usr/local/lib/node_modules/.scrat_npminstall/yeoman-generator/0.17.7/yeoman-generator/lib/actions/actions.js:191:11)
    at Generator.template (/usr/local/lib/node_modules/.scrat_npminstall/yeoman-generator/0.17.7/yeoman-generator/lib/actions/actions.js:286:19)
    at Generator.proto.dotFiles (/usr/local/lib/node_modules/.scrat_npminstall/generator-scrat/0.2.2-1/generator-scrat/app/index.js:123:10)
    at /usr/local/lib/node_modules/.scrat_npminstall/yeoman-generator/0.17.7/yeoman-generator/lib/base.js:395:14
    at tryOnImmediate (timers.js:534:15)
    at processImmediate [as _immediateCallback] (timers.js:514:5)
[ian@ian-mbp /tmp/git/front]$ls -al /Users/ian/.scrat-tmp/init/webapp/
total 0
drwxr-xr-x  3 ian staff 102  4 19 13:50 ./
drwxr-xr-x  4 ian staff 136  4 19 13:50 ../
drwxr-xr-x 14 ian staff 476  4 19 13:50 scrat-template-webapp-master/
[ian@ian-mbp /tmp/git/front]$ 

尝试过其他几个选项seo和olpm都是这样的错误

@atian25
Copy link
Member

atian25 commented Apr 19, 2016

node 的版本是?

@ian4hu
Copy link
Author

ian4hu commented Apr 19, 2016

[ian@ian-mbp /tmp/git/front]$ node -v
v5.10.1

@atian25
Copy link
Member

atian25 commented Apr 19, 2016

换回 LTS 4.x 版本吧, init 用的 yeoman , 对 npm3 的扁平化判断哪里有问题

@ian4hu
Copy link
Author

ian4hu commented Apr 19, 2016

@atian25 卸载了node 安装了node4-lts还是出错呢

[ian@ian-mbp /tmp/git/front]$ scrat init
[?] Your project name: toolkit
[?] Your project version: 1.0.0
[?] What type of scrat project to init? webapp

     info ... Fetching https://codeload.github.com/scrat-team/scrat-template-webapp/tar.gz/master ...
     info This might take a few moments
...
✔ Done in /Users/ian/.scrat-tmp/init/webapp

/usr/local/lib/node_modules/.scrat_npminstall/yeoman-generator/0.17.7/yeoman-generator/lib/actions/actions.js:191
    throw new Error('Unable to read "' + filepath + '" file (Error code: ' + e.code + ').');
    ^

Error: Unable to read "/Users/ian/.scrat-tmp/init/webapp/_gitignore" file (Error code: ENOENT).
    at Generator.read (/usr/local/lib/node_modules/.scrat_npminstall/yeoman-generator/0.17.7/yeoman-generator/lib/actions/actions.js:191:11)
    at Generator.template (/usr/local/lib/node_modules/.scrat_npminstall/yeoman-generator/0.17.7/yeoman-generator/lib/actions/actions.js:286:19)
    at Generator.proto.dotFiles (/usr/local/lib/node_modules/.scrat_npminstall/generator-scrat/0.2.2-1/generator-scrat/app/index.js:123:10)
    at /usr/local/lib/node_modules/.scrat_npminstall/yeoman-generator/0.17.7/yeoman-generator/lib/base.js:395:14
    at processImmediate [as _immediateCallback] (timers.js:383:17)
[ian@ian-mbp /tmp/git/front]$ node -v
v4.4.3

@atian25
Copy link
Member

atian25 commented Apr 19, 2016

跟了下, 好像是 yeoman-generator 的内部依赖升级导致的

https://github.com/scrat-team/generator-scrat/blob/master/app/index.js#L69

.scrat-tmp/init/webapp/scrat-template-webapp-master 后面那段改变了.

晚点再找时间修复吧, 你可以先自行下载 scrat-template-webapp 这个库

@ian4hu ian4hu closed this as completed Aug 16, 2018
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