webpack - Angular-cli: Module not found: Error: Can't resolve 'PouchDB' -
os?
linux (amazon linux ami)
versions.
angular-cli: 1.0.0-beta.22-1 node: 6.6.0 os: linux x64
repro steps.
i installed pouchdb:
npm pouchdb --save npm @types/pouchdb --save-dev
i added in typings.d.ts:
declare module 'pouchdb';
and import pouchdb in service:
import * pouchdb 'pouchdb';
well, okey in laptop (macos sierra); ng serve
, ng build
without problems , pouchdb working well.
but... not same thing in server (amazon linux ami)... 😐
i'm getting next error trying execute ng build
:
error in ./src/app/pictures.service.ts module not found: error: can't resolve 'pouchdb' in '/home/aral/project/src/app' @ ./src/app/pictures.service.ts 11:0-35 @ ./src/app/app.module.ts @ ./src/app/index.ts @ ./src/main.ts @ multi main
i have same angular-cli version , node version in laptop... 😧
and compared doing tree
command in laptop , server , both have same files. (except sub-dependency in node_modules
).
thank you!
issue reported in github: https://github.com/angular/angular-cli/issues/3698
i using mac in laptop , reason why in laptop don't have issue: because mac main filesystem case insensitive. linux not forgiving. importing pouchdb system looking node_modules names pouchdb, it's named pouchdb (lowercase).
Comments
Post a Comment