orientjs icon indicating copy to clipboard operation
orientjs copied to clipboard

Dependency issues and errors when installing from npm.

Open Davenporten opened this issue 6 years ago • 2 comments

I installed orientjs via npm and now have [email protected] on my project. In my code I have an import statement like

import OrientDB from 'orientjs';

Just to note, I'm running this on the WSL of my windows machine. I'm trying to use orientjs in a react app and when I start the app I get the following:

Failed to compile. [14/14] Error in ./~/orientjs/lib/transport/binary/connection.js Module not found: ./protocol28 in .../gui_demo/node_modules/orientjs/lib/transport/binary

@ ./~/orientjs/lib/transport/binary/connection.js 231:24-47

Error in ./~/orientjs/lib/transport/binary/connection.js Module not found: ./protocol26 in .../gui_demo/node_modules/orientjs/lib/transport/binary

@ ./~/orientjs/lib/transport/binary/connection.js 234:24-47

Error in ./~/orientjs/lib/transport/binary/connection.js Module not found: ./protocol19 in .../gui_demo/node_modules/orientjs/lib/transport/binary

@ ./~/orientjs/lib/transport/binary/connection.js 237:24-47

Error in ./~/parse-function/dist/cjs/index.js Module parse failed: .../gui_demo/node_modules/parse-function/dist/cjs/index.js Unexpected token (1:1837) You may need an appropriate loader to handle this file type. SyntaxError: Unexpected token (1:1837) @ ./~/orientjs/lib/db/db.js 16:12-37

Error in ./~/orientjs/lib/client/topology/cluster.js Module not found: 'dns' in .../gui_demo/node_modules/orientjs/lib/client/topology

@ ./~/orientjs/lib/client/topology/cluster.js 7:12-26

Error in ./~/require-main-filename/test.js Module not found: 'tap' in .../gui_demo/node_modules/require-main-filename

@ ./~/require-main-filename/test.js 5:0-14

Error in ./~/require-main-filename/test.js Module not found: 'chai' in .../gui_demo/node_modules/require-main-filename

@ ./~/require-main-filename/test.js 6:0-15

Error in ./~/execa/index.js Module not found: 'child_process' in .../gui_demo/node_modules/execa @ ./~/execa/index.js 2:21-45

Error in ./~/orientjs/lib/client/network/conn.js Module not found: ./protocol33 in .../gui_demo/node_modules/orientjs/lib/client/network

@ ./~/orientjs/lib/client/network/conn.js 215:20-43

Error in ./~/cross-spawn/index.js Module not found: 'child_process' in .../gui_demo/node_modules/cross-spawn

@ ./~/cross-spawn/index.js 3:9-33

When I manually add in the protocol dirs from 2.2.11 those dependency errors go away. As for the others I'm not sure if they are on my end, but as I've tried to install needed packages the problems persist.

Davenporten avatar Nov 08 '19 13:11 Davenporten

Hi @Davenporten

Are you using OrientJS in Electron? or a normal Web app?

Thanks

wolf4ood avatar Nov 11 '19 08:11 wolf4ood

Hi @wolf4ood thanks for taking a look at this.

It was running in just a normal web app. And over the weekend I installed [email protected] via npm, moved my code to a pure node instance, and things seem to be working. I don't know why these protocol dirs were missing and these other errors were occurring though when installing orientjs@latest.

Thanks!

Davenporten avatar Nov 12 '19 13:11 Davenporten