calvinmetcalf / crypto-pouch

plugin for encrypted pouchdb/couchdb databases
MIT License
243 stars 43 forks source link

Uncaught Error: Cannot find module "node-uuid" #58

Closed hadrien-toma closed 7 years ago

hadrien-toma commented 7 years ago

Hi there, I am facing the following error at runtime, trying to use crypto-pouch:

Uncaught Error: Cannot find module "node-uuid"
    at d (polyfills.js:3)
    at webpackMissingModule (index.js:12)
    at Object.<anonymous> (index.js:12)
    at Object.module.exports.createDebug.debug.createDebug.default (index.js:182)
    at __webpack_require__ (bootstrap d5d4138…:47)
    at Object.<anonymous> (index.ts:2)
    at __webpack_require__ (bootstrap d5d4138…:47)
    at Object.<anonymous> (pouchdb.service.ts:26)
    at __webpack_require__ (bootstrap d5d4138…:47)
    at Object.<anonymous> (index.ts:2)
    at __webpack_require__ (bootstrap d5d4138…:47)
    at Object.<anonymous> (index.ts:2)
    at __webpack_require__ (bootstrap d5d4138…:47)
    at Object.<anonymous> (index.ts:2)
    at __webpack_require__ (bootstrap d5d4138…:47)

I am importing the package like this:

import * as CryptoPouch from 'crypto-pouch';
PouchDB.plugin(CryptoPouch);

The error seems to be thrown by the second line. Maybe I am doing something wrong?

calvinmetcalf commented 7 years ago

have you installed all the dependencies ?

what are you using to bundle the app ?

hadrien-toma commented 7 years ago

I installed the npm package so dependencies should be installed too. I am using Ionic 3 to bundle the application.

calvinmetcalf commented 7 years ago

is node-uuid there?

hadrien-toma commented 7 years ago

Arf no, there is no node-uuid but uuid is there, with version 3.0.1. Do I have to install node-uuid manually?

Update: node-uuid is present in the node_modules of crypto-pouch but not in the app node_modules.

calvinmetcalf commented 7 years ago

Node uuid is a dependency of this library so I don't know how it wouldn't be installed

On Mon, May 8, 2017, 5:41 PM Hadrien TOMA notifications@github.com wrote:

Arf no, there is no node-uuid but uuid is here, with version 3.0.1. Do I have to install node-uuid manually?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/calvinmetcalf/crypto-pouch/issues/58#issuecomment-299999249, or mute the thread https://github.com/notifications/unsubscribe-auth/ABE4nz6lAUyKDRY3S2kpX9u-T7bYuE0Gks5r34wXgaJpZM4NTjOm .

hadrien-toma commented 7 years ago

This is what I have when I install crypto-pouch:

> npm install --save crypto-pouch
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
pro-optoruta@0.0.1 /home/hadrien-toma/dev/ionic/pro-optoruta
├── UNMET PEER DEPENDENCY @angular/common@4.1.1
├── UNMET PEER DEPENDENCY @angular/compiler@4.1.1
├── UNMET PEER DEPENDENCY @angular/compiler-cli@4.1.1
├── UNMET PEER DEPENDENCY @angular/core@4.1.1
├── UNMET PEER DEPENDENCY @angular/forms@4.1.1
├── UNMET PEER DEPENDENCY @angular/http@4.1.1
├── UNMET PEER DEPENDENCY @angular/platform-browser@4.1.1
├── UNMET PEER DEPENDENCY @angular/platform-browser-dynamic@4.1.1
├─┬ crypto-pouch@3.1.1 
│ └── node-uuid@1.4.8 
└── UNMET PEER DEPENDENCY rxjs@5.3.1

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ionic-angular@3.1.1 requires a peer of @angular/common@4.0.2 but none was installed.
npm WARN ionic-angular@3.1.1 requires a peer of @angular/compiler@4.0.2 but none was installed.
npm WARN ionic-angular@3.1.1 requires a peer of @angular/compiler-cli@4.0.2 but none was installed.
npm WARN ionic-angular@3.1.1 requires a peer of @angular/core@4.0.2 but none was installed.
npm WARN ionic-angular@3.1.1 requires a peer of @angular/forms@4.0.2 but none was installed.
npm WARN ionic-angular@3.1.1 requires a peer of @angular/http@4.0.2 but none was installed.
npm WARN ionic-angular@3.1.1 requires a peer of @angular/platform-browser@4.0.2 but none was installed.
npm WARN ionic-angular@3.1.1 requires a peer of @angular/platform-browser-dynamic@4.0.2 but none was installed.
npm WARN ionic-angular@3.1.1 requires a peer of rxjs@5.1.1 but none was installed.
hadrien-toma commented 7 years ago

node-uuid is in fact in the node_modules of crypto-pouch. Maybe it is searched in the app node_modules (this is where I searched it first)?

calvinmetcalf commented 7 years ago

well I need to update it to use uuid instead of node-uuid anyway so let me put out a new version and see what happends

calvinmetcalf commented 7 years ago

ok updated

hadrien-toma commented 7 years ago

It works! Thank you @calvinmetcalf, really usefull plugin!