-1

I've been trying to fix an error in angular2 which is Cannot find module: 'angular2-cookie/core'. I tried to fix it by following the instructions here. But I can't seem to find or locate the systemjs.config.js file...So, where can I find it?

Tshilidzi Mudau
  • 7,373
  • 6
  • 36
  • 49
celty
  • 1
  • 1

1 Answers1

0

How did you create your application?

If you used the Angular CLI then you are not using SystemJS and have no SystemJS configuration file.

There are two common patterns used in Angular development for loading up the code for our application:

SystemJS

WebPack

The Angular documentation (and the QuickStart) use systemjs because it is quick and easy.

The Angular CLI and many other devs use WebPack because it is very powerful.

So if you aren't using SystemJS in your application you won't have a SystemJS configuration file.

See this link for much more information: What are differences between SystemJS and Webpack?

If you are using systemJs then the configuration file should be in the root application folder, which is the same folder as your package.json file.

enter image description here

DeborahK
  • 57,520
  • 12
  • 104
  • 129
  • Actually, it was not me who created the application. It was my friend who created it. I just cloned it from git and when tried to run it, there was an error in which the angular2-cookie module is not found. – celty Aug 10 '17 at 08:17
  • Should I be the one to make the webpack.config.js file? :) – celty Aug 10 '17 at 08:18
  • It depends on how the app was created. If it uses the CLI then the webpack config is hidden until you eject it. You should not manually create one. – DeborahK Aug 10 '17 at 14:43