These are chat archives for angular/angular-2-ionic-2

Apr 2018
Yogesh Patel
Apr 05 2018 08:35

Hi Team, I have a weird requirement, I have 5+ ionic app so I want to use common centralize node_modules so all app use reference of it. Is it possible?

I tried to create structure like directory has node_modules and all apps but ionic-app-scripts.js throw error that Looks like a fresh checkout! No ./node_modules directory found. Would you like to install project dependencies?. Is there any way to overcome this issue?

Thanks in advance.

Owen Melbourne
Apr 05 2018 08:58
you can put your code in packages, then include the packge
so they will all download a copy of it
but means you can update in 1 place, then roll out to them all
Yogesh Patel
Apr 05 2018 09:01
@OwenMelbz I have to use only node_modules my all codes are separate. You can check my boilerplate.
I don't want to install node_modules in every application.
Owen Melbourne
Apr 05 2018 09:05
its not really designed to do that, you can be lazy and try symlinking your outside node modules folder, into the folders of the other projceets
on linx/mac you would do something like ln -s node_modules ./First/node_modules
Yogesh Patel
Apr 05 2018 09:07
let me try @OwenMelbz
Yogesh Patel
Apr 05 2018 09:18
@OwenMelbz Thanks.
Apr 05 2018 11:04

Im trying to add Worker Loader in Ionic project. I am able to run the app but failed at running karma!
I added webpack worker-loader to project how discribe here :

  1. Install worker-loader npm i -D worker-loader
  2. Created worker typescript file src/…/worker/bootstrap.worker.ts
  3. Created worker type definitions in src/typings.d.ts
    ionic build --prod - OK
    npm run test - ERROR in ./node_modules/@ngtools/webpack/src!./src/…/bootstrap.worker.ts
    Module build failed: Error: @ngtools/webpack is being used as a loader but no tsConfigPath option nor AotPlugin was detected. You must provide at least one of these.
    at Object.ngcLoader (C:…\node_modules@ngtools\webpack\src\loader.js:617:19)

The same error for Angular is described here Webpack + Angular 5 + Worker Loader + Karma

How make correct config for karma?

Surya Teja
Apr 05 2018 17:05
I have some problem with ionic 3
How can i upload photo in this one