Closed
Description
OS?
Linux (Amazon Linux AMI)
Versions.
Please run
ng --version
. If there's nothing outputted, please run in a Terminal:node --version
and paste the result here:
angular-cli: 1.0.0-beta.22-1
node: 6.6.0
os: linux x64
Repro steps.
I installed recently PouchDB:
npm i pouchdb --save
npm i @types/pouchdb --save-dev
I added this in typings.d.ts:
declare module 'PouchDB';
And now I import PouchDB in my service:
import * as PouchDB from 'PouchDB';
Well, all is okey in my laptop (MacOS Sierra); ng serve
, ng build
without problems and PouchDB is working well.
But... Not the same thing in my server (Amazon Linux AMI)... 😐
I'm getting the next error trying to 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 the same angular-cli version and node version that in my laptop... 😧
And I compared doing tree
command in my laptop and my server and both have the same files. (Except some sub-dependency in node_modules
).
Thank you!
Metadata
Metadata
Assignees
Labels
No labels