ngageoint / mage-server

Mobile Awareness GEOINT Environment Server
Apache License 2.0
88 stars 46 forks source link

can't install server on Google Cloud #78

Closed JerryCro closed 4 years ago

JerryCro commented 4 years ago

npm run migrate npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /home/mage/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/home/mage/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /home/mage/.npm/_logs/2020-03-30T22_07_32_818Z-debug.log mage@mage:~$ node app.js internal/modules/cjs/loader.js:985 throw err; ^ Error: Cannot find module '/home/magec/app.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15) at Function.Module._load (internal/modules/cjs/loader.js:864:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) at internal/main/run_main_module.js:18:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

restjohn commented 4 years ago

The output indicates that whatever is running those commands is not in the same directory as the MAGE server code. The process cannot find a package.json or app.js. Those commands should run from the same directory as MAGE Server's package.json.

By the way, you should not need to run npm run migrate manually, as MAGE automatically runs migrations when it starts.

Make sure you're following the instructions in the README. As for anything specific to the Google Cloud environment, we won't be much help there, unfortunately.