Wtower / generator-makrina

Yeoman generator for MEAN projects
MIT License
5 stars 0 forks source link

Error during project generation #30

Closed stonerolling closed 7 years ago

stonerolling commented 7 years ago

Hi George,

Thanks for this generator, it looks really interesting but unfortunately it hasn't work for me yet. I keep getting the following error message when I attempt to generate a project using "yo makrina". I have tried in in an Windows environment and with Ubuntu and different node version. Maybe you can help?

Ubuntu with Node v4.7.0

? Project name osboxes
? Verbose name Osboxes
? Description Osboxes
? Git repository URL 
? Author 
? Organization 
? Organization URL 
? Deploy host 
? New Relic license key 
? Angular app short name admin
? Angular app name osboxesAdminApp
? Angular app path public/javascripts
? Object name (recommended camelCase) node
? Object title (recommended PascalCase) Node
? Object API URL and directory name (recommended kebab-case) node
Generating angular-app application module
Generating angular-core-service module
Generating angular-component-list module
Generating angular-component-detail module
Generating model for mongoose and api endpoints
events.js:141
      throw er; // Unhandled 'error' event
      ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:8:11)
    at Object.posix.join (path.js:479:5)
    at Base.destinationPath (/home/osboxes/.nvm/versions/node/v4.7.0/lib/node_modules/generator-makrina/node_modules/yeoman-generator/lib/base.js:752:28)
    at /home/osboxes/.nvm/versions/node/v4.7.0/lib/node_modules/generator-makrina/generators/angular-app/index.js:50:15
    at Array.forEach (native)
    at module.exports.yeoman.Base.extend.writing (/home/osboxes/.nvm/versions/node/v4.7.0/lib/node_modules/generator-makrina/generators/angular-app/index.js:47:19)
    at Object.<anonymous> (/home/osboxes/.nvm/versions/node/v4.7.0/lib/node_modules/generator-makrina/node_modules/yeoman-generator/lib/base.js:439:23)
    at /home/osboxes/.nvm/versions/node/v4.7.0/lib/node_modules/generator-makrina/node_modules/run-async/index.js:25:25
    at /home/osboxes/.nvm/versions/node/v4.7.0/lib/node_modules/generator-makrina/node_modules/run-async/index.js:24:19
    at /home/osboxes/.nvm/versions/node/v4.7.0/lib/node_modules/generator-makrina/node_modules/yeoman-generator/lib/base.js:440:9

Ubuntu with node v7.3.0

? Project name osboxes
? Verbose name Osboxes
? Description Osboxes
? Git repository URL 
? Author 
? Organization 
? Organization URL 
? Deploy host 
? New Relic license key 
? Angular app short name admin
? Angular app name osboxesAdminApp
? Angular app path public/javascripts
? Object name (recommended camelCase) node
? Object title (recommended PascalCase) Node
? Object API URL and directory name (recommended kebab-case) node
Generating angular-app application module
Generating angular-core-service module
Generating angular-component-list module
Generating angular-component-detail module
Generating model for mongoose and api endpoints

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

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:1211:7)
    at child.Base.destinationPath (/home/osboxes/.nvm/versions/node/v7.3.0/lib/node_modules/generator-makrina/node_modules/yeoman-generator/lib/base.js:752:28)
    at /home/osboxes/.nvm/versions/node/v7.3.0/lib/node_modules/generator-makrina/generators/angular-app/index.js:50:15
    at Array.forEach (native)
    at child.writing (/home/osboxes/.nvm/versions/node/v7.3.0/lib/node_modules/generator-makrina/generators/angular-app/index.js:47:19)
    at Object.<anonymous> (/home/osboxes/.nvm/versions/node/v7.3.0/lib/node_modules/generator-makrina/node_modules/yeoman-generator/lib/base.js:439:23)
    at /home/osboxes/.nvm/versions/node/v7.3.0/lib/node_modules/generator-makrina/node_modules/run-async/index.js:25:25
    at /home/osboxes/.nvm/versions/node/v7.3.0/lib/node_modules/generator-makrina/node_modules/run-async/index.js:24:19
    at /home/osboxes/.nvm/versions/node/v7.3.0/lib/node_modules/generator-makrina/node_modules/yeoman-generator/lib/base.js:440:9
stonerolling commented 7 years ago

Windows 10 with Node v6.9.2

? Project name Test
? Verbose name Test
? Description Test
? Git repository URL
? Author
? Organization
? Organization URL
? Deploy host
? New Relic license key
? Angular app short name admin
? Angular app name test
? Angular app path public/javascripts
? Object name (recommended camelCase) node
? Object title (recommended PascalCase) Node
? Object API URL and directory name (recommended kebab-case) node
Generating angular-app application module
Generating angular-core-service module
Generating angular-component-list module
Generating angular-component-detail module
Generating model for mongoose and api endpoints
events.js:160
      throw er; // Unhandled 'error' event
      ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:468:7)
    at child.Base.destinationPath (C:\Users\Devel Oper\AppData\Roaming\npm\node_modules\generator-makrina\node_modules\yeoman-generator\lib\base.js:752:28)
    at C:\Users\Devel Oper\AppData\Roaming\npm\node_modules\generator-makrina\generators\angular-app\index.js:50:15
    at Array.forEach (native)
    at child.writing (C:\Users\Devel Oper\AppData\Roaming\npm\node_modules\generator-makrina\generators\angular-app\index.js:47:19)
    at Object.<anonymous> (C:\Users\Devel Oper\AppData\Roaming\npm\node_modules\generator-makrina\node_modules\yeoman-generator\lib\base.js:439:23)
    at C:\Users\Devel Oper\AppData\Roaming\npm\node_modules\generator-makrina\node_modules\run-async\index.js:25:25
    at C:\Users\Devel Oper\AppData\Roaming\npm\node_modules\generator-makrina\node_modules\run-async\index.js:24:19
    at C:\Users\Devel Oper\AppData\Roaming\npm\node_modules\generator-makrina\node_modules\yeoman-generator\lib\base.js:440:9
Wtower commented 7 years ago

Hi and thanks a lot for the time taken to write this issue.

This is indeed a bug with the generator. A fix will be released in the next hour.

More specifically, it has to do with the new parameter angularAppPath that was introduced in the sub-generators with the latest 0.5.1 release, issue #26 .

The main generator failed to provide a default angularAppPath to the sub-generators.

Wtower commented 7 years ago

Published v0.5.2, it should fix this.