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

Posted

技术标签:

【中文标题】无法在 Debian 上启动独立的 parse.com 服务器【英文标题】:Can't start stand-alone parse.com server on Debian 【发布时间】:2016-02-25 08:32:27 【问题描述】:

有解析服务器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.

【问题讨论】:

发布更新:添加安装日志。 【参考方案1】:

我无法重现此错误。您的命令行在我的系统中运行良好。

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

如果你不能这样做,请告诉你有哪个 2.1.2 版本。运行 git log | head -1 以准确获取您正在运行的 git 提交,以便能够知道这是否是 Parse 错误,它只存在很短的时间。

【讨论】:

从 github (2.1.3) 更新到最新版本,仍然有同样的问题。无论如何,感谢您的研究!发帖后有一些新想法 请同时更新您的错误。如果升级到 2.1.3,You must provide an appId! 将不再存在【参考方案2】:

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

检查你是否已经这样做了

【讨论】:

我什至没有找到这个文件。项目目录下没有同名文件:root@parseserver:~/parse/parse-server# ls CHANGELOG.md LICENSE README.md jsconfig.json node_modules spec CONTRIBUTING.md PATENTS bin lib package.json src 我的安装是完成还是遗漏了什么?安装日志添加到 OP。 从文档中,您可以拥有一个 config.js 或在命令行中提供这些。 @Shadow_ 这不是你的问题的原因。

以上是关于无法在 Debian 上启动独立的 parse.com 服务器的主要内容,如果未能解决你的问题,请参考以下文章

由于 mysql2 或 mysql gems,无法在 Debian 上启动 Mongrel(或Passenger)

Debian linux上SSH服务无法启用

为啥在 Debian 9 中编译的 golang 二进制文件无法在 Centos 7 中启动?

Debian GRUB 救援 - “无效的独立于拱门的 ELF 魔法”

Wildfly 独立通过网络启动不工作

Debian系列-在新的GNOME下无法启动Qt