有解析服务器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。
我哪里做错了?
2016 年 2 月 26 日更新:
安装是由该命令执行的
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.