reyesoft / ngx-jsonapi

JSON API client library for Angular 5+ 👌 :: Production Ready 🚀
https://ngx-jsonapi.reyesoft.com/
MIT License
101 stars 52 forks source link

Module not found: Error: Can't resolve 'faker' #256

Open ZeevKatz opened 4 years ago

ZeevKatz commented 4 years ago

After the last version update (2.1.14), I'm receiving an error about faker.

Here is the exception:

ERROR in <path>/node_modules/ngx-jsonapi/ngx-jsonapi/@ngx-jsonapi/ngx-jsonapi.js
Module not found: Error: Can't resolve 'faker' in '<path>/node_modules/ngx-jsonapi/ngx-jsonapi/@ngx-jsonapi'

Angular Version:


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 8.3.20
Node: 12.13.1
OS: darwin x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.803.20
@angular-devkit/build-angular      0.803.20
@angular-devkit/build-ng-packagr   0.803.20
@angular-devkit/build-optimizer    0.803.20
@angular-devkit/core               8.3.20
@angular-devkit/schematics         8.3.20
@angular/cdk                       8.2.3
@angular/cli                       8.3.20
@angular/flex-layout               8.0.0-beta.27
@angular/localize                  9.0.0-rc.0
@schematics/angular                8.3.20
@schematics/update                 0.803.20
ng-packagr                         5.7.1
rxjs                               6.5.3
typescript                         3.4.5
webpack                            4.41.3
iamchrismiller commented 4 years ago

Yeah, I am experiencing this as well. Looks like the latest release (Not shown in releases tab) has the export of the test factory which relies on faker in the DEV dependency bundle.

https://github.com/reyesoft/ngx-jsonapi/blob/2703fd23bdd2380feffe9888ded66a7a5dac7422/src/public_api.ts

I am curious as to why ANY of the test modules are being included in the public api definition.

I am assuming this was a mistake. I had to move back to 2.1.12 for this library to work with Angular 8 in the mean time.

maxi7587 commented 4 years ago

We exported the test modules so we can use them to test other apps... I'll try to export the test modules separately to avoid this issue. Thanks for reporting!

ivelichko commented 4 years ago

2.1.15 - the issue is still present

ap1969 commented 4 years ago

Confirmed - also on v2.1.15 with this issue.

CapturedMomentum commented 4 years ago

Still seeing this as well - 2.1.15

Temp workaround in local dev has been to save faker as a dev dependency.