Search code examples
yonpmjs

npm install does not download one specific file


I have created one yo generator and I can see the code is available in github and also showing in yo generator list.

Its working perfectly when I do npm install to download the generator code into my local machine and also when scaffold application using yo command.

Only problem is one of my file (systemjs.config.js) which is in the /generator/template folder is not getting downloaded niter from npm install nor when I scaffold application using yo command.

generator link git link to generator

command to download and scaffold from yo generator

npm install -g yo
npm install -g generator-angular2-with-router
yo angular2-with-router

Solution

  • The problem was occurring due to .gitingore file which was ignoring all the .js files as the project is in typescript. I was ignoring all my .js and .js.map files in my git ignore file

    as systemjs.config.js file is a js file, its has been ignored by publish or something was happening with npm and it was not downloading.

    Now I changed my .gitignore file and so that specific .js and .js.map file will be ignored and it resolved my problem.