0

I have Angula2 -cli project and set it like the site cli.angular.io guide.

To start with new project I need to run cmd: ng new my-project-name and the project folder is created with some files and also node_module folder.

How can I avoid the node_module folder creation every time I create a new project ?

Can I just reference to the node.js module that is located in my PC?

2pha
  • 9,798
  • 2
  • 29
  • 43
shori
  • 3
  • 1
  • Please spellcheck your question title and body. –  Jun 03 '16 at 13:48
  • Normally installing the dependencies is done with a very simple `npm install`. You could otherwise do a link: `https://docs.npmjs.com/cli/link` to link to another module instead of copying all the files, or even install it globally and then require it like this: http://stackoverflow.com/questions/15636367/nodejs-require-a-global-module-package – coyotte508 Jun 03 '16 at 16:47

1 Answers1

0

The node_modules folder is created to hold dependencies of your project, so you will need that in order to run or test your application.

With that being said, if you'd like to just create the project without installing all of them, you can use the skip-npm argument, but note that you will not be able to run or test your application.

ng new my-project-name --skip-npm
Brocco
  • 62,737
  • 12
  • 70
  • 76