无法在Debian上启动独立的parse.com服务器

时间:2016-02-25 08:32:27

标签: node.js parse-platform npm parse-server

有解析服务器https://github.com/ParsePlatform/parse-server

这是parse.com服务的独立版本。

我有Debian 8.3,全新安装。 我从git下载了解析服务器,执行安装,但仍然无法启动服务。

我这样安装:

git clone https://github.com/ParsePlatform/parse-server.git
npm install

我有这个命令后

npm run start

输出:

You must provide an appId!
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "start"
npm ERR! node v5.7.0
npm ERR! npm  v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! parse-server@2.1.2 start: `./bin/parse-server`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the parse-server@2.1.2 start script './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!     ./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.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/parse/parse-server/bin/npm-debug.log

和后命令

sudo npm start -- --appId foo --masterKey bar --serverURL http://localhost:1337/parse

输出:

> parse-server@2.1.2 start /root/parse/parse-server
> ./bin/parse-server "--appId" "foo" "--masterKey" "bar" "--serverURL" "http://localhost:1337/parse"


/root/parse/parse-server/lib/requiredParameter.js:8
  throw errorMessage;
  ^
You must provide an appId!

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start" "--" "--appId" "foo" "--masterKey" "bar" "--serverURL" "http://localhost:1337/parse"
npm ERR! node v5.7.0
npm ERR! npm  v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! parse-server@2.1.2 start: `./bin/parse-server "--appId" "foo" "--masterKey" "bar" "--serverURL" "http://localhost:1337/parse"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the parse-server@2.1.2 start script './bin/parse-server "--appId" "foo" "--masterKey" "bar" "--serverURL" "http://localhost:1337/parse"'.
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!     ./bin/parse-server "--appId" "foo" "--masterKey" "bar" "--serverURL" "http://localhost:1337/parse"
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.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/parse/parse-server/bin/npm-debug.log

在最后一个命令中我明确指定了appId,但是输出表明没有指定appId。

我哪里出错了?

更新26.02.2016:

通过该命令执行安装

root@parseserver:~/parse/parse-server# npm install --unsafe-perm

输出是:

> parse-server@2.1.3 prepublish /root/parse/parse-server
> npm run build


> parse-server@2.1.3 build /root/parse/parse-server
> babel src/ -d lib/

src/APNS.js -> lib/APNS.js
src/Adapters/AdapterLoader.js -> lib/Adapters/AdapterLoader.js
src/Adapters/Files/FilesAdapter.js -> lib/Adapters/Files/FilesAdapter.js
src/Adapters/Files/GridStoreAdapter.js -> lib/Adapters/Files/GridStoreAdapter.js
src/Adapters/Files/S3Adapter.js -> lib/Adapters/Files/S3Adapter.js
src/Adapters/Logger/FileLoggerAdapter.js -> lib/Adapters/Logger/FileLoggerAdapter.js
src/Adapters/Logger/LoggerAdapter.js -> lib/Adapters/Logger/LoggerAdapter.js
src/Adapters/Push/OneSignalPushAdapter.js -> lib/Adapters/Push/OneSignalPushAdapter.js
src/Adapters/Push/ParsePushAdapter.js -> lib/Adapters/Push/ParsePushAdapter.js
src/Adapters/Push/PushAdapter.js -> lib/Adapters/Push/PushAdapter.js
src/Adapters/Push/PushAdapterUtils.js -> lib/Adapters/Push/PushAdapterUtils.js
src/Auth.js -> lib/Auth.js
src/Config.js -> lib/Config.js
src/Controllers/AdaptableController.js -> lib/Controllers/AdaptableController.js
src/Controllers/FilesController.js -> lib/Controllers/FilesController.js
src/Controllers/LoggerController.js -> lib/Controllers/LoggerController.js
src/Controllers/PushController.js -> lib/Controllers/PushController.js
src/DatabaseAdapter.js -> lib/DatabaseAdapter.js
src/ExportAdapter.js -> lib/ExportAdapter.js
src/GCM.js -> lib/GCM.js
src/PromiseRouter.js -> lib/PromiseRouter.js
src/RestQuery.js -> lib/RestQuery.js
src/RestWrite.js -> lib/RestWrite.js
src/Routers/AnalyticsRouter.js -> lib/Routers/AnalyticsRouter.js
src/Routers/ClassesRouter.js -> lib/Routers/ClassesRouter.js
src/Routers/FilesRouter.js -> lib/Routers/FilesRouter.js
src/Routers/FunctionsRouter.js -> lib/Routers/FunctionsRouter.js
src/Routers/IAPValidationRouter.js -> lib/Routers/IAPValidationRouter.js
src/Routers/InstallationsRouter.js -> lib/Routers/InstallationsRouter.js
src/Routers/LogsRouter.js -> lib/Routers/LogsRouter.js
src/Routers/PushRouter.js -> lib/Routers/PushRouter.js
src/Routers/RolesRouter.js -> lib/Routers/RolesRouter.js
src/Routers/SchemasRouter.js -> lib/Routers/SchemasRouter.js
src/Routers/SessionsRouter.js -> lib/Routers/SessionsRouter.js
src/Routers/UsersRouter.js -> lib/Routers/UsersRouter.js
src/Schema.js -> lib/Schema.js
src/batch.js -> lib/batch.js
src/cache.js -> lib/cache.js
src/cli/cli-definitions.js -> lib/cli/cli-definitions.js
src/cli/parse-server.js -> lib/cli/parse-server.js
src/cli/utils/commander.js -> lib/cli/utils/commander.js
src/cryptoUtils.js -> lib/cryptoUtils.js
src/global_config.js -> lib/global_config.js
src/httpRequest.js -> lib/httpRequest.js
src/index.js -> lib/index.js
src/middlewares.js -> lib/middlewares.js
src/oauth/OAuth1Client.js -> lib/oauth/OAuth1Client.js
src/oauth/facebook.js -> lib/oauth/facebook.js
src/oauth/github.js -> lib/oauth/github.js
src/oauth/google.js -> lib/oauth/google.js
src/oauth/index.js -> lib/oauth/index.js
src/oauth/instagram.js -> lib/oauth/instagram.js
src/oauth/linkedin.js -> lib/oauth/linkedin.js
src/oauth/meetup.js -> lib/oauth/meetup.js
src/oauth/twitter.js -> lib/oauth/twitter.js
src/password.js -> lib/password.js
src/requiredParameter.js -> lib/requiredParameter.js
src/rest.js -> lib/rest.js
src/testing-routes.js -> lib/testing-routes.js
src/transform.js -> lib/transform.js
src/triggers.js -> lib/triggers.js
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8
npm WARN mongodb-core@1.2.32 requires a peer of kerberos@~0.0 but none was installed.

2 个答案:

答案 0 :(得分:1)

我无法重现此错误。您的命令行在我的系统中正常工作。

Parse现在获得了很多更新。最新版本是2.1.3,并且有其他错误消息和其他布局。请尝试升级并再次运行。

如果你不能这样做,请说明你有哪个2.1.2版本。运行git log | head -1以获得您正在运行的git提交,以便能够知道这是否是Parse错误,该错误仅存在很短的时间。

答案 1 :(得分:0)

您需要在index.js文件中提供您的appId和masterKey。

检查您是否已经完成