yeoman / generator-mobile

Scaffold out a mobile project based on Web Starter Kit
http://yeoman.io
918 stars 99 forks source link

Error during gulpfile configuration step #85

Open petersandor opened 8 years ago

petersandor commented 8 years ago

Hi, I just tried this generator and I found this:

? Looks good? Yes
     info Getting latest WSK release version ...
     info Found release v0.6.1
     info Fetching https://github.com/google/web-starter-kit/archive/v0.6.1.zip ...
     info This might take a few moments
...................................āˆš Done
     info Checking dependencies ...
     info Configuring gulpfile.js
fs.js:584
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\Projects\mobile-wsk\gulpfile.js'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at readFileAsString (C:\Users\user\AppData\Roaming\npm\node_modules\generator-mobile\node_modules\yeoman-generator\lib\actions\wiring.js:277:13)
    at module.exports.yeoman.generators.Base.extend.writing.gulpfile (C:\Users\user\AppData\Roaming\npm\node_modules\generator-mobile\app\index.js:137:27)
    at C:\Users\user\AppData\Roaming\npm\node_modules\generator-mobile\node_modules\yeoman-generator\lib\base.js:395:14
    at processImmediate [as _immediateCallback] (timers.js:383:17)

I noticed that there is a gulpfile.babel.js in the directory so I guess that is a change in WSK that was not reflected here.

bradoyler commented 8 years ago

Looks like this needs to be updated: https://github.com/yeoman/generator-mobile/blob/master/app/index.js#L134 As well as a few tests...

sandhilt commented 8 years ago

Same issue here.

edm00se commented 7 years ago

It looks like updating the file name to gulpfile.babel.js works as expected, but there's more to the tests it would seem, as a simple string replace of the file name didn't resolve them (including after installing google cloud sdk). If I were better at wading through the test scripts, I would update them and submit the PR; šŸ˜.

npm test output

## results of `npm test` after making replacing all occurrences of `gulpfile.js` with new `gulpfile.babel.js` (run on node 6.9.1 LTS) ``` sh Ī» generator-mobile ā†’ Ī» git master* ā†’ npm test > generator-mobile@2.0.0-alpha test /Users/eric/Source Control/Git/generator-mobile > mocha --timeout 5000 mobile:app default layout, no hosting 1) "before all" hook download module āœ“ fetches latest release version and creates downloader āœ“ handles GitHub releases request failure mobile:app - GAE hosting āœ— gcloud: not configured 2) "before all" hook mobile:app - GitHub hosting project 3) "before all" hook org/user 4) "before all" hook custom domain for a user/org 5) "before all" hook as a repo 6) "before all" hook prompts module āœ“ extracts domain from url āœ“ recognizes GitHub domain githubTarget āœ“ validates input āœ“ filters input āœ“ knows when to ask the question āœ“ infers default value from github.io siteUrl populateMissing āœ“ infers githubTarget from siteUrl āœ“ infers siteUrl from githubTarget āœ“ infers siteHost from siteUrl āœ“ infers githubBranch 12 passing (2s) 6 failing 1) mobile:app default layout, no hosting "before all" hook: Uncaught Error: ENOENT: no such file or directory, open '/Users/eric/Source Control/Git/generator-mobile/test/tmp/gulpfile.babel.js' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33) at constructor.readFileAsString (node_modules/yeoman-generator/lib/actions/wiring.js:277:13) at constructor.gulpfile (app/index.js:135:27) at node_modules/yeoman-generator/lib/base.js:395:14 2) mobile:app - GAE hosting "before all" hook: Uncaught Error: ENOENT: no such file or directory, open '/Users/eric/Source Control/Git/generator-mobile/test/tmp/gulpfile.babel.js' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33) at constructor.readFileAsString (node_modules/yeoman-generator/lib/actions/wiring.js:277:13) at constructor.gulpfile (app/index.js:135:27) at node_modules/yeoman-generator/lib/base.js:395:14 3) mobile:app - GitHub hosting project "before all" hook: Uncaught Error: ENOENT: no such file or directory, open '/Users/eric/Source Control/Git/generator-mobile/test/tmp/gulpfile.babel.js' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33) at constructor.readFileAsString (node_modules/yeoman-generator/lib/actions/wiring.js:277:13) at constructor.gulpfile (app/index.js:135:27) at node_modules/yeoman-generator/lib/base.js:395:14 4) mobile:app - GitHub hosting org/user "before all" hook: Uncaught Error: ENOENT: no such file or directory, open '/Users/eric/Source Control/Git/generator-mobile/test/tmp/gulpfile.babel.js' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33) at constructor.readFileAsString (node_modules/yeoman-generator/lib/actions/wiring.js:277:13) at constructor.gulpfile (app/index.js:135:27) at node_modules/yeoman-generator/lib/base.js:395:14 5) mobile:app - GitHub hosting custom domain for a user/org "before all" hook: Uncaught Error: ENOENT: no such file or directory, open '/Users/eric/Source Control/Git/generator-mobile/test/tmp/gulpfile.babel.js' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33) at constructor.readFileAsString (node_modules/yeoman-generator/lib/actions/wiring.js:277:13) at constructor.gulpfile (app/index.js:135:27) at node_modules/yeoman-generator/lib/base.js:395:14 6) mobile:app - GitHub hosting custom domain as a repo "before all" hook: Uncaught Error: ENOENT: no such file or directory, open '/Users/eric/Source Control/Git/generator-mobile/test/tmp/gulpfile.babel.js' at Error (native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync (fs.js:508:33) at constructor.readFileAsString (node_modules/yeoman-generator/lib/actions/wiring.js:277:13) at constructor.gulpfile (app/index.js:135:27) at node_modules/yeoman-generator/lib/base.js:395:14 npm ERR! Test failed. See above for more details. ```

MrChen1993 commented 7 years ago

The same

islishude commented 7 years ago

rename the gulpfile.bable.js to gulpfile.js , and run again yo mobile