문제를 재현 할 수있었습니다. 로그에 나타나는 오류는 다음과 같습니다.
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR /home/vcap/app/node_modules/loopback/node_modules/strong-globalize/node_modules/os-locale/index.js:2
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR const execa = require('execa');
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR ^^^^^
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR SyntaxError: Use of const in strict mode.
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR at exports.runInThisContext (vm.js:73:16)
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR at Module._compile (module.js:443:25)
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR at Object.Module._extensions..js (module.js:478:10)
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR at Module.load (module.js:355:32)
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR at Function.Module._load (module.js:310:12)
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR at Module.require (module.js:365:17)
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR at require (module.js:384:17)
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR at Object.<anonymous> (/home/vcap/app/node_modules/loopback/node_modules/strong-globalize/lib/globalize.js:13:16)
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR at Module._compile (module.js:460:26)
2017-11-09T12:06:31.13-0600 [APP/PROC/WEB/0] ERR at Object.Module._extensions..js (module.js:478:10)
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! Linux 4.4.0-75-generic
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! argv "/home/vcap/app/vendor/node/bin/node" "/home/vcap/app/vendor/node/bin/npm" "start"
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! node v0.12.18
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! npm v2.15.11
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! code ELIFECYCLE
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! [email protected] start: `node .`
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! Exit status 1
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR!
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! Failed at the [email protected] start script 'node .'.
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! This is most likely a problem with the HelloTodo package,
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! not with npm itself.
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! Tell the author that this fails on your system:
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! node .
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! You can get information on how to open an issue for this project with:
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! npm bugs HelloTodo
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! Or if that isn't available, you can get their info via:
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR!
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! npm owner ls HelloTodo
2017-11-09T12:06:31.18-0600 [APP/PROC/WEB/0] ERR npm ERR! There is likely additional logging output above.
2017-11-09T12:06:31.21-0600 [APP/PROC/WEB/0] ERR npm ERR! Please include the following file with any support request:
2017-11-09T12:06:31.21-0600 [APP/PROC/WEB/0] ERR npm ERR! /home/vcap/app/npm-debug.log
이 오류는 Node.js 0.12에서 ES6이 기본적으로 활성화되어 있지 않기 때문에 발생합니다. @pradeep sg가 말했듯이 블로그 게시물과 시동기는 상당히 오래된 것입니다. 스타터의 코드를 보면, package.json에 노드 버전 0.12가 지정되어 있습니다.
https://github.com/ibm-bluemix-mobile-services/bms-hellotodo-strongloop
, 해당 지역의 환경 문제를 해결 스타터 코드를 다운로드하고 다음과 같이 package.json을 수정하려면 :
{
"name": "HelloTodo",
"description": "A simple todo list application created with StringLoop, LoopBack and Bluemix Mobile Services",
"version": "1.0.0",
"main": "server/server.js",
"scripts": {
"start": "node ."
},
"author": "Anton Aleksandrov",
"dependencies": {
"bluemix-appid": "1.x",
"compression": "^1.0.3",
"cors": "^2.5.2",
"loopback": "^2.22.0",
"loopback-boot": "^2.6.5",
"loopback-component-explorer": "^2.1.0",
"loopback-connector-mysql": "^2.2.0",
"loopback-datasource-juggler": "^2.39.0",
"passport": "^0.3.2",
"serve-favicon": "^2.0.1"
},
"repository": {
"type": "git",
"url": "https://github.com/ibm-bluemix-mobile-services/bms-hellotodo-strongloop.git"
},
"engines": {
"node": "8.9.x"
},
"license": "Apache-2.0"
그것을 사용하므로 다음, bx cf push
가 다시 배포 할 노드의 최신 엔진. 나는 그것을 한 후
, 그것은 일 : 당신이 모바일 팀에서 생산되는 최신 콘텐츠를보고 싶은 경우
는 Bluemix 여기에 자신의 대시 보드를 체크 아웃 :
https://console.bluemix.net/developer/mobile/dashboard
최신 스타터 키트, 데모, 블로그 및 출시 할 콘텐츠를 제공합니다. .
배포가 올바르게 작동하도록이 문제에 대해 알려 드리겠습니다.
@atanony 개발자 작품의 오래된 블로그를 언급하고 있습니다. 푸시 알림을 위해 Android 앱을 사용하는 방법에 대한 자세한 정보는 YouTube 링크 및 github 링크를 통해 살펴볼 수 있습니까? https://www.youtube.com/watch?v=Fza8kj74Lqs https://github.com/ibm-bluemix-mobile-services/bms-samples-android-hellopush/ –
@ pradeep-sg 고맙습니다. 귀하의 의견 및 링크. – actanony