Skip to content

ubuntu 16.04 - on upgrade (parse-server) project wont run without "sudo"  #338

@rowntreerob

Description

@rowntreerob

With last years deprecation of parse, i did the original migration to mongo using mlab implementation and parse-server-example project running on heroku site and it all just worked.

I revisited the project on a dev host using ubuntu, did a fetch and merge which upgraded the parse-server (2.2.n to 4.4.4). The npm upgrade seemed to install ok but now the sample node project will not start unless i use sudo.

I supplied 4 or 5 env var values in the package.json.start script cli.

I expected the project to just run , but without sudo i get the following errors pointing to the arg handler/constructor in "parseServer.js" ....

=======================================
$ npm start

parse-server-example@1.4.0 start /home/rob/src/tmp/parse-server
DATABASE_URI=mongodb://4@31.mlab.com:13931/beacontst APP_ID=Mrc7 MASTER_KEY=L0P SERVER_URL=http://localhost:1337/parse PUBLIC_SERVER_URL=http://120:1337/parse PORT=1337 node index.js

/home/rob/src/tmp/parse-server/node_modules/parse-server/lib/ParseServer.js:460
throw err;
^

TypeError: this is not a typed array.
at Function.from (native)
at Object. (/home/rob/src/tmp/parse-server/node_modules/parse-server/node_modules/ws/lib/PerMessageDeflate.js:8:24)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/home/rob/src/tmp/parse-server/node_modules/parse-server/node_modules/ws/lib/WebSocket.js:16:27)
at Module._compile (module.js:425:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! parse-server-example@1.4.0 start: DATABASE_URI=mongodb://34@31.mlab.com:13931/beacontst APP_ID=0Mrc7 MASTER_KEY=6L0P SERVER_URL=http://localhost:1337/parse PUBLIC_SERVER_URL=http://.120:1337/parse PORT=1337 node index.js
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the parse-server-example@1.4.0 start script 'DATABASE_URI=mongodb://34@31.mlab.com:13931/beacontst APP_ID=Mrc7 MASTER_KEY=6L0P SERVER_URL=http://localhost:1337/parse PUBLIC_SERVER_URL=http://120:1337/parse PORT=1337 node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the parse-server-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! DATABASE_URI=mongodb://@nnn.mlab.com:13931/beacontst APP_ID=Mrc7 MASTER_KEY=L0P SERVER_URL=http://localhost:1337/parse PUBLIC_SERVER_URL=http://136.....20:1337/parse PORT=1337 node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs parse-server-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls parse-server-example
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/rob/.npm/_logs/2017-03-31T14_38_26_445Z-debug.log

==========================================
when i use sudo , it starts up fine .....

$ sudo npm start
[sudo] password for rob:

parse-server-example@1.4.0 start /home/rob/src/tmp/parse-server
DATABASE_URI=mongodb://34@31.mlab.com:13931/beacontst APP_ID=Mrc7 MASTER_KEY=6L0P SERVER_URL=http://localhost:1337/parse PUBLIC_SERVER_URL=http://120:1337/parse PORT=1337 node index.js

parse-server-example running on port 1337.
info: Parse LiveQuery Server starts running

=======
IF THE NPM UPGRADE INSTALLED OK THEN THE UPGRADED PROJECT SHOULD RUN WITHOUT SUDO

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions