Angular2 AOT compiler keeps asking for name

Is there a reason (which I can fix) why I am doing this:

ngc -p tsconfig.aot.json

In response, he asks:

Name:

Seems to ngc

just ignore mine tsconfig.aot.json

.

What could be causing this?

Thank!

+3


source to share


2 answers


NPM gets confused between a component generator package called ngc so remove it then AOT build will be smooth

npm uninstall ngc -g

      



then in package.json make an entry

 "scripts": {
    "ngc": "node_modules/.bin/ngc -p ./tsconfig-aot.json",
    "start": "npm run ngc && webpack-dev-server --inline --config config/webpack.dev.js --progress --port 3000",
    "webpack": "npm run ngc && webpack --config config/webpack.dev.js",

      

+3


source


  • Check your package.json, remove references to 'ngc' module.
  • Empty the node_modules folder
  • Reinstall required angular-cli modules


The above three steps should solve the problem.

+1


source







All Articles