Skip to content

parse-server fails to start (parse-server: command not found) #4686

Closed
@Edijae

Description

@Edijae

I have followed the below commands to install parse server locally.

`$ npm install -g parse-server mongodb-runner
$ mongodb-runner start
$ parse-server --appId myserver --masterKey myserver --databaseURI mongodb://localhost/test

the server files are downloaded and stored at ~/.npm-global/lib/node_modules/parse-server$ when i go to that folder and try to run parse-server --appId myserver --masterKey myserver --databaseURI mongodb://localhost/test on the terminal, I get the error below

parse-server: command not found

When i try to run npm start on the terminal from the same folder, I get the error below

[email protected] start /home/user/.npm-global/lib/node_modules/parse-server
> node ./bin/parse-server

/home/user/.npm-global/lib/node_modules/parse-server/lib/ParseServer.js:124
    const {
          ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/user/.npm-global/lib/node_modules/parse-server/lib/index.js:8:21)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

npm ERR! Linux 4.4.0-112-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node ./bin/parse-server`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'node ./bin/parse-server'.
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 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./bin/parse-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs parse-server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls parse-server
npm ERR! There is likely additional logging output above.
```

how can i run it?
Another thing, I had already installed mongodb and using it on my laptop. did 
```
$ npm install -g parse-server mongodb-runner
$ mongodb-runner start
```
install another mongo db?

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