ndxbxrme / generator-angular-meteor

106 stars 19 forks source link

Generation fails @ events.js:141 #41

Open mmccoy opened 8 years ago

mmccoy commented 8 years ago
Created a new Meteor app in 'appName'.        

To run your new app:                          
  cd appName                                  
  meteor                                      

If you are new to Meteor, try some of the learning resources here:
  https://www.meteor.com/learn                

events.js:141                                 
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, unlink '/Users/mmccoy/src/foo/appName/appName.html'
    at Error (native)
    at Object.fs.unlinkSync (fs.js:932:18)
    at null.<anonymous> (/usr/local/lib/node_modules/generator-angular-meteor/generators/app/index.js:209:12)
    at Array.forEach (native)
    at module.exports.yeoman.generators.Base.extend.cleanMeteorDirectory (/usr/local/lib/node_modules/generator-angular-meteor/generators/app/index.js:208:32)
    at /usr/local/lib/node_modules/generator-angular-meteor/node_modules/yeoman-generator/lib/base.js:421:16
    at processImmediate [as _immediateCallback] (timers.js:383:17)
austingreendev commented 8 years ago

I have also gone back several version and am still seeing this issue. Same as mine in #42

austingreendev commented 8 years ago

@mmccoy I have found a workaround for this issue. It is occurring because the new version of meteor creates a directory and naming structure with the meteor create command which it is not looking for.

To correct the issue I followed the directions in the CONTRIBUTING.md file to create a local developer linked version of the generator. Then I corrected line 199 in src/app/index.coffee to be

createMeteorProject: ->
    cb = @async()
    genUtils.spawnSync 'meteor', [
      '--release'
      '1.2'
      'create'
      @appname
    ], cb

This resolved the issue for me. @ndxbxrme this could be of assistance to you. You probably don't want to just move it back a hard release so I wont do a pull-request unless this is what you're looking for.

Let me know if this helps.

ndxbxrme commented 8 years ago

hey guys sorry i haven't been around

i can fix the ENOENT issue but that unleashes a whole slew of new errors image

i'm going to implement the fix suggested by @austin94 until i can make the generator meteor1.3 compatible

ndxbxrme commented 8 years ago

try the new version (v0.20.7)

austingreendev commented 8 years ago

@ndxbxrme Thank you for the update. This is a great tool and this issue is in every other tool currently including the iron-router CLI.

Thanks for the fast reply.

developer-lindner commented 8 years ago

Got a similar issue:

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn meteor ENOENT
    at exports._errnoException (util.js:1012:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)