You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
parse-server fails to start (parse-server: command not found) #4686
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
parse-server@2.7.4 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! parse-server@2.7.4 start: `node ./bin/parse-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the parse-server@2.7.4 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?
I have updated node to v8.11.1 but when i try to run parse-server --appId "crusar" --masterKey "crusar" --databaseURI mongodb://localhost/test from the terminal or from inside ~/.npm-global/lib/node_modules/parse-server/ folder, i get the error parse-server: command not found and when i try to run npm start --appId "crusar" --masterKey "crusar" i get the error below
module.js:549
throw err;
^
Error: Cannot find module '/home/user/.npm-global/lib/node_modules/parse-server/crusar'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at parseConfigFile (/home/user/.npm-global/lib/node_modules/parse-server/lib/cli/utils/commander.js:83:24)
at Command._commander.Command.parse (/home/user/.npm-global/lib/node_modules/parse-server/lib/cli/utils/commander.js:121:20)
at exports.default (/home/user/.npm-global/lib/node_modules/parse-server/lib/cli/utils/runner.js:20:23)
at Object.<anonymous> (/home/user/.npm-global/lib/node_modules/parse-server/lib/cli/parse-server.js:48:22)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
ooh my. that worked. so it means i have to enter parse-server folder(~/.npm-global/lib/node_modules/parse-server) and run the terminal from there. there is no way to do it directly without navigating to the folder. Isn't It?
Another thing is why did parse-server --appId "crusar" --masterKey "crusar" --databaseURI mongodb://localhost/test command fail?
@flovilmart I tried to upload this parse-server to google app engine. First i created a file called app.yaml inside parse-server folder. It contained the following
when i run gcloud app deploy in the terminal, it is deployed to my app engine but not started for i get an npm error appId and masterKey are required. this error is printed in the terminal. It's like ~/.npm-global/lib/node_modules/parse-server/lib/cli/parse-server.js is being executed but the options parameter doesn't have appId and masterKey. When I try gcloud app deploy --appId "myId" --masterKey "my masterKey" it fails since the 2 options aren't part of gcloud. Where else can i set appId apart from app.yaml file? Kindly help
Activity
[-]parse-server fails to start[/-][+]parse-server fails to start (parse-server: command not found)[/+]flovilmart commentedon Mar 30, 2018
Your node version (4.2.6) is outdated, you need to upgrade to a most recent version like 8.11.
Edijae commentedon Mar 30, 2018
@flovilmart did
interfere with my other mongo db which i had installed by following instructions from mongodb.com?
flovilmart commentedon Mar 30, 2018
The issue is not about mongodb, mongodb-runner is safe to use alongside your setup. You need to download and install the latest node version
Edijae commentedon Mar 30, 2018
I have updated node to v8.11.1 but when i try to run
parse-server --appId "crusar" --masterKey "crusar" --databaseURI mongodb://localhost/testfrom the terminal or from inside~/.npm-global/lib/node_modules/parse-server/folder, i get the errorparse-server: command not foundand when i try to runnpm start --appId "crusar" --masterKey "crusar"i get the error belowflovilmart commentedon Mar 30, 2018
If you use npm start, your should add -- before the first parameter:
npm start -- --appId ...Edijae commentedon Mar 30, 2018
ooh my. that worked. so it means i have to enter parse-server folder(~/.npm-global/lib/node_modules/parse-server) and run the terminal from there. there is no way to do it directly without navigating to the folder. Isn't It?
Another thing is why did
parse-server --appId "crusar" --masterKey "crusar" --databaseURI mongodb://localhost/testcommand fail?flovilmart commentedon Mar 30, 2018
after you reinstalled node, you should probably run
npm install -g parse-serverthen theparse-servercommand should be available.flovilmart commentedon Mar 30, 2018
if it isn,t it's probably because your PATH environment variable isn't properly configured.
Edijae commentedon Mar 31, 2018
@flovilmart Awesome.After I set my PATH variable at
/etc/enviromentparse-servercommand worked.Thank you @flovilmart for your help. God bless you.
Edijae commentedon Apr 2, 2018
@flovilmart I tried to upload this parse-server to google app engine. First i created a file called
app.yamlinside parse-server folder. It contained the followingwhen i run
gcloud app deployin the terminal, it is deployed to my app engine but not started for i get an npm errorappId and masterKey are required. this error is printed in the terminal. It's like~/.npm-global/lib/node_modules/parse-server/lib/cli/parse-server.jsis being executed but theoptionsparameter doesn't have appId and masterKey. When I trygcloud app deploy --appId "myId" --masterKey "my masterKey"it fails since the 2 options aren't part of gcloud. Where else can i set appId apart from app.yaml file? Kindly helpEdijae commentedon Apr 3, 2018
@flovilmart I deployed the server sample app instead of this and it worked.