steveblue / angular2-rollup

CLI for bundling Angular with Rollup and Closure Compiler
121 stars 18 forks source link

Enhancement - useful error message when running ngr in a non-ngr project #29

Closed babeal closed 5 years ago

babeal commented 5 years ago

If i "accidentally" get confused and run ngr in an angular cli project and not an ngr project i get:

NGR ERROR Error: not found
    at Function.module.exports.sync (/Users/brandt/.nvm/versions/node/v8.12.0/lib/node_modules/angular-rollup/node_modules/findup/index.js:94:9)
    at new Config (/Users/brandt/.nvm/versions/node/v8.12.0/lib/node_modules/angular-rollup/src/config.js:17:34)
    at Object.<anonymous> (/Users/brandt/.nvm/versions/node/v8.12.0/lib/node_modules/angular-rollup/src/config.js:64:18)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)

If would be nice if the cli would return a message say that it's not an ngr compatible project.

steveblue commented 5 years ago

Agreed.

steveblue commented 5 years ago

Fixed on develop branch.