Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on fetch for angular2-indexeddb.js ? #32

Closed
ghatul opened this issue Feb 1, 2017 · 2 comments · May be fixed by #312, #320, #324 or #335
Closed

Error on fetch for angular2-indexeddb.js ? #32

ghatul opened this issue Feb 1, 2017 · 2 comments · May be fixed by #312, #320, #324 or #335

Comments

@ghatul
Copy link

ghatul commented Feb 1, 2017

hi,
I stuck with configuration of indexdb on production build it get Error on fetch for angular2-indexeddb.js.It work without error on development.i cant understand how to solve this, could u please help me out.....

i tried following project.config.ts but it not worked :-
SYSTEM_CONFIG_DEV: any = {
defaultJSExtensions: true,
transpiler: 'typescript', typescriptOptions: { emitDecoratorMetadata: true },
packageConfigPaths: [
.
.
.
.
'dragula': 'node_modules/dragula/dist/dragula.min.js',
'angular2-indexeddb':'node_modules/angular2-indexeddb/',
'crypto-js': 'node_modules/crypto-js/crypto-js.js',
'app/': '/app/',
// For test config
'dist/dev/': '/base/dist/dev/',
'': 'node_modules/'
},
packages: {
'angular2-indexeddb': {
main: 'index.ts',
defaultExtension: 'ts'
}
}
};

on gulp build.prod shows following error:-

[18:45:25] 'build.bundles.app' errored after 2.82 s
[18:45:25] Error on fetch for angular2-indexeddb.js at file:///home/node_modules/angular2-indexeddb.js
Loading dist/tmp_client/app//db-service/db.service.js
Loading dist/tmp_client/app/app.module.js
Loading dist/tmp_client/app/main.js
Error: ENOENT: no such file or directory, open '/home/node_modules/angular2-indexeddb.js'
at Error (native)
[18:45:25] 'build.prod' errored after 33 s
[18:45:25] Error in plugin 'run-sequence(build.bundles.app)'
Message:
Error on fetch for angular2-indexeddb.js at file:///home/node_modules/angular2-indexeddb.js
Loading dist/tmp_client/app/qeasily/framework/db-service/db.service.js
Loading dist/tmp_client/app/app.module.js
Loading dist/tmp_client/app/main.js
ENOENT: no such file or directory, open '/home/node_modules/angular2-indexeddb.js'
Details:
originalErr: Error: ENOENT: no such file or directory, open '/home/node_modules/angular2-indexeddb.js'
Stack:
Error on fetch for angular2-indexeddb.js at file:///home/chetan/node_modules/angular2-indexeddb.js
Loading dist/tmp_client/app/framework/db-service/db.service.js
Loading dist/tmp_client/app/app.module.js
Loading dist/tmp_client/app/main.js
Error: ENOENT: no such file or directory, open '/home/chetan/node_modules/angular2-indexeddb.js'
at Error (native)

@vyakymenko
Copy link
Owner

@ghatul , error in incorrect configuration for lib that you try to use.

Here is an example with higcharts in project.config.ts:

let additionalPackages: ExtendPackages[] = [
      {
        name: 'angular2-highcharts',
        // Path to the package's bundle
        path: 'node_modules/angular2-highcharts/dist/index.js'
      },{
        name: 'highcharts',
        // Path to the package's bundle
        path: 'node_modules/highcharts/highcharts.js'
      },{
        name: 'highcharts/highstock.src',
        // Path to the package's bundle
        path: 'node_modules/highcharts/highstock.js'
      },
    ];

    this.addPackagesBundles(additionalPackages);

Same construction will be for your indxedDB lib or other.

Thanks!

@ghatul
Copy link
Author

ghatul commented Feb 8, 2017

thanku...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment