moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
315 stars 128 forks source link

node_modules/@ng-idle/core.js not found #28

Open gustavolira opened 7 years ago

gustavolira commented 7 years ago

Hi, I just update NgIdleModule to beta 2.0.0-beta.4. My code looks like:

import {NgIdleModule} from '@ng-idle/core'; ...

imports: [NgIdleModule.forRoot()]

But I'm receiving GET http://localhost:5555/node_modules/@ng-idle/core.js 404 Not Found

moribvndvs commented 7 years ago

How are you building/bundling your application? I think your configuration has some issues. I'd expect to find the main export for core to be in node_modules/@ng-idle/core/index.js

gustavolira commented 7 years ago

Hi @HackedByChinese first of all, thank you for your attention. I'm using angular2 seed. If I put @ng-idle/core/index I start receive another 404: GET http://localhost:5555/node_modules/traceur.js 404 Not Found

dlangsam commented 7 years ago

I am also having a similar problem

ManasviA commented 7 years ago

@gustavolira @dlangsam Please add following to tools/config/project.config.ts file:

let additionalPackages: ExtendPackages[] = [{
      name: '@ng-idle/core',
      // Path to the package's bundle
      path: 'node_modules/@ng-idle/core/bundles/core.umd.js'
    }];
this.addPackagesBundles(additionalPackages);

This should resolve the issue.

hutysta commented 6 years ago

Hi, I had same issue. For me it helped when I added this line into map property in systemjs.config.js file: '@ng-idle/core': 'npm:@ng-idle/core/bundles/core.umd.js'

karel1980 commented 6 years ago

Another instance of this problem (combined with angular-seed): https://github.com/mgechev/angular-seed/pull/2151