Angular2 - do not look in 'node_modules' for a specific module

I am trying to implement Firebase permission for Google, Twitter, etc.

Following this guide, showing me to invoke the following commands

npm install angularfire2 firebase --save
npm install @types/firebase`

and adding this to tsconfig.json

"typeRoots": [
      "../node_modules/@types"
    ],
    "types": [
      "jasmine",
      "firebase",
      "node"
    ]

Now the problem is trying to import classes / modules from the module angularfire2, my browser returns 404 on localhost:3000/angularfire2, and all the other node_modules are extracted successfully from localhost:3000/node_modules/..., how can I make what my application looks in node_modulesfor this particular call?

(following each instruction in the above mentioned manual - all the code is exactly the same, if necessary, I can provide it from my own code or the file tree, if necessary).

+4
1

.

systemjs . . systemjs documentation.

- :

...
var map = {
  ...
  'angularfire2': 'node_modules/angularfire2',
  'firebase ': 'node_modules/firebase',
  ...    
};
...
...
var packages = {
  ...
  'angularfire2': { main: 'index.js', defaultExtension: 'js' },
  ...
};
...

node_modules.

+2

Source: https://habr.com/ru/post/1660686/


All Articles