multiparty / web-mpc

Platform for deploying web-based privacy-preserving data surveys using secure multi-party computation (MPC).
https://www.multiparty.org
MIT License
54 stars 22 forks source link

unable to start a server #91

Closed mnaboka closed 6 years ago

mnaboka commented 6 years ago

i was following the instructions from readme

root@ac4aba4b71a3:/web-mpc/server# npm install

> ursa@0.9.4 install /web-mpc/server/node_modules/ursa
> node-gyp rebuild

make: Entering directory '/web-mpc/server/node_modules/ursa/build'
  CXX(target) Release/obj.target/ursaNative/src/ursaNative.o
  SOLINK_MODULE(target) Release/obj.target/ursaNative.node
  COPY Release/ursaNative.node
make: Leaving directory '/web-mpc/server/node_modules/ursa/build'
npm WARN web-mpc-server@2.0.0 No description
npm WARN web-mpc-server@2.0.0 No repository field.

added 293 packages in 13.172s
root@ac4aba4b71a3:/web-mpc/server# npm install -g forever
/usr/local/bin/forever -> /usr/local/lib/node_modules/forever/bin/forever
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/forever/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ forever@0.15.3
updated 1 package in 4.348s

unfortunately i keep getting this error

> root@ac4aba4b71a3:/web-mpc/server# node index.js
module.js:557
    throw err;
    ^

Error: Cannot find module 'amdefine'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/web-mpc/client/app/helper/mpc.js:2:16)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/web-mpc/server/index.js:23:13)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)

looks like the amdfile is under node_modules

root@ac4aba4b71a3:/web-mpc/server# ls -l node_modules/amdefine/
total 32
-rw-r--r-- 1 root root 2831 Nov  2  2016 LICENSE
-rw-r--r-- 1 root root 6132 Nov  2  2016 README.md
-rw-r--r-- 1 root root 9916 Nov  2  2016 amdefine.js
-rw-r--r-- 1 root root 1068 Nov  2  2016 intercept.js
-rw-r--r-- 1 root root 1226 Jan 19 18:23 package.json

my nodejs environment

root@ac4aba4b71a3:/web-mpc/server# node --version
v9.4.0
root@ac4aba4b71a3:/web-mpc/server# npm --version
5.6.0
frederickjansen commented 6 years ago

Hi @mnaboka, I'm not seeing this problem on a fresh checkout of the project. Can you please try removing server/package-lock.json and running npm install again?

mnaboka commented 6 years ago

@frederickjansen thanks! it's working now, i'll close this issue