GrayBullet / generator-graybullet-cordova

Webapp and AngularJS yeoman generator for Apache Cordova.
MIT License
10 stars 4 forks source link

Throw error, npm ERR! EEXIST, open file #11

Closed hirokihara closed 9 years ago

hirokihara commented 9 years ago

Cannot create project with windows.Throw error, npm ERR! EEXIST, open file

OS:Windows 7 pro 64bit

I retried, after "npm cache clean" and "npm update -g" , but it was the same result.

C:\Users\Owner\Documents\graybullet>yo graybullet-cordova

     _-----_
    |       |    .--------------------------.
    |--(o)--|    |   Welcome to the Apache  |
   `---------´   |    Cordova generator!    |
    ( _´U`_ )    '--------------------------'
    /___A___\
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

? What is the name of Apache Cordova App? HelloCordova
? What is the ID of Apache Cordova App? io.cordova.hellocordova
? What app of the platform to be created? android
? Are you sure you want to add any plugins? Cordova Console Plugin, Cordova Device Plugin

     _-----_
    |       |    .--------------------------.
    |--(o)--|    |    Welcome to Yeoman,    |
   `---------´   |   ladies and gentlemen!  |
    ( _´U`_ )    '--------------------------'
    /___A___\
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

Out of the box I include HTML5 Boilerplate, jQuery, and a Gruntfile.js to build your app.
? What more would you like? Bootstrap
   create cordova\.gitignore
   create fake\cordova.js
   create cordova\www\.gitkeep
   create Gruntfile.js
   create package.json
   create .gitignore
   create .gitattributes
   create .bowerrc
   create bower.json
   create .jshintrc
   create .editorconfig
   create app\styles\main.css
   create app\favicon.ico
   create app\robots.txt
   create app\index.html
   create app\scripts\main.js
   invoke   mocha

I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.

   create     test\bower.json
   create     test\.bowerrc
   create     test\spec\test.js
   create     test\index.html
bower mocha#~1.14.0             cached https://github.com/visionmedia/mocha.git#1.14.0
bower mocha#~1.14.0           validate 1.14.0 against https://github.com/visionmedia/mocha.git#~1.14.0
bower bootstrap#~3.2.0          cached https://github.com/twbs/bootstrap.git#3.2.0
bower bootstrap#~3.2.0        validate 3.2.0 against https://github.com/twbs/bootstrap.git#~3.2.0
bower chai#~1.8.0               cached https://github.com/chaijs/chai.git#1.8.1
bower chai#~1.8.0             validate 1.8.1 against https://github.com/chaijs/chai.git#~1.8.0
bower chai#~1.8.0              install chai#1.8.1
bower mocha#~1.14.0            install mocha#1.14.0

chai#1.8.1 bower_components\chai

mocha#1.14.0 bower_components\mocha
bower jquery#>= 1.9.0           cached https://github.com/jquery/jquery.git#2.1.1
bower jquery#>= 1.9.0         validate 2.1.1 against https://github.com/jquery/jquery.git#>= 1.9.0
bower bootstrap#~3.2.0         install bootstrap#3.2.0
bower jquery#>= 1.9.0          install jquery#2.1.1

bootstrap#3.2.0 bower_components\bootstrap
└── jquery#2.1.1

jquery#2.1.1 bower_components\jquery
npm WARN package.json graybullet@ No description
npm WARN package.json graybullet@ No repository field.
npm WARN package.json graybullet@ No README data
npm WARN optional dep failed, continuing imagemin-gifsicle@1.0.0
npm WARN optional dep failed, continuing imagemin-jpegtran@1.0.0
npm WARN optional dep failed, continuing imagemin-optipng@1.0.0
npm WARN optional dep failed, continuing imagemin-pngquant@1.0.2
npm ERR! EEXIST, open 'C:\Users\Owner\AppData\Roaming\npm-cache\823fb2fe-m-cache-lodash-2-4-1-package-tgz.lock'
File exists: C:\Users\Owner\AppData\Roaming\npm-cache\823fb2fe-m-cache-lodash-2-4-1-package-tgz.lock
Move it away, and try again.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\Owner\Documents\graybullet\test
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\Owner\AppData\Roaming\npm-cache\823fb2fe-m-cache-lodash-2-4-1-package-tgz.lock
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! not ok code 0

C:\Users\Owner\Documents\graybullet>

my tools version

C:\Users\Owner\Documents\graybullet>node -v
v0.10.33

C:\Users\Owner\Documents\graybullet>yo -v
1.3.3

C:\Users\Owner\Documents\graybullet>npm -v
1.4.28
masakura commented 9 years ago

https://github.com/npm/npm/search?q=EEXIST&type=Issues&utf8=%E2%9C%93

Many many many same trouble!

https://github.com/npm/npm/issues/6309#issuecomment-56940320

I believe that f24b552, which is included in npm@2.1.0, fixes this problem, but since I don't have a reproducible instance of it, I won't know if it fixes the problem until you install npm@2.1.0 and use it in your build. Please do so, and let me know if it works. Thank you for your patience!

Try npm install -g npm and add global install exec directory to first of path env.

hirokihara commented 9 years ago

I tried doing your advice, but could not work.

I used the nodist, can now work.

Thanks

masakura commented 9 years ago

See Upgrading on Windows.