在heroku上构建/部署tilestream时出错

时间:2014-10-18 09:44:05

标签: node.js heroku tilemill

我想在heroku上有一个tilestream,我已经按照教程进行了操作,并且我做了完全相同的操作并继续得到构建/编译错误。

刚刚添加了2个文件和一个目录:

Procfile:

web: tilestream --host radiant-thicket-3365.herokuapp.com --uiPort=$PORT --tilePort=$PORT --tiles=./tiles

的package.json:

{
  "name": "myTest",
  "version": "0.0.1",
  "dependencies": {
    "tilestream": "1.1.0"
  }
}

清空./tiles dir。

当通过git推送到heroku时,我收到以下错误:

-----> Node.js app detected

       PRO TIP: Specify a node version in package.json
       See https://devcenter.heroku.com/articles/nodejs-support

-----> Defaulting to latest stable node: 0.10.32
-----> Downloading and installing node
-----> Exporting config vars to environment
-----> Installing dependencies
       npm WARN package.json myTest@0.0.1 No description
       npm WARN package.json myTest@0.0.1 No repository field.
       npm WARN package.json myTest@0.0.1 No README data
       npm WARN engine tilestream@1.1.0: wanted: {"node":"0.8.x"} (current: {"node":"0.10.32","npm":"1.4.28"})
       npm WARN engine tilelive@4.3.3: wanted: {"node":">= 0.6.0 && < 0.9.0"} (current: {"node":"0.10.32","npm":"1.4.28"})

       > contextify@0.1.9 install /tmp/build_762e588f-64f4-471d-90ab-3cda8f92929c/node_modules/tilestream/node_modules/bones/node_modules/jquery/node_modules/jsdom/node_modules/contextify
       > node-gyp rebuild

       make: Entering directory `/tmp/build_762e588f-64f4-471d-90ab-3cda8f92929c/node_modules/tilestream/node_modules/bones/node_modules/jquery/node_modules/jsdom/node_modules/contextify/build'
         CXX(target) Release/obj.target/contextify/src/contextify.o
         SOLINK_MODULE(target) Release/obj.target/contextify.node
         SOLINK_MODULE(target) Release/obj.target/contextify.node: Finished
         COPY Release/contextify.node
       make: Leaving directory `/tmp/build_762e588f-64f4-471d-90ab-3cda8f92929c/node_modules/tilestream/node_modules/bones/node_modules/jquery/node_modules/jsdom/node_modules/contextify/build'
       npm WARN deprecated set-immediate@0.1.1: Use `setimmediate` instead

       > sqlite3@2.2.7 install /tmp/build_762e588f-64f4-471d-90ab-3cda8f92929c/node_modules/tilestream/node_modules/mbtiles/node_modules/sqlite3
       > node-pre-gyp install --fallback-to-build

       [sqlite3] Command failed: 
       module.js:356
         Module._extensions[extension](this, filename);
                                      ^
       Error: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/build_762e588f-64f4-471d-90ab-3cda8f92929c/node_modules/tilestream/node_modules/mbtiles/node_modules/sqlite3/lib/binding/node-v11-linux-x64/node_sqlite3.node)
           at Module.load (module.js:356:32)
           at Function.Module._load (module.js:312:12)
           at Module.require (module.js:364:17)
           at require (module.js:380:17)
           at [eval]:1:1
           at Object.<anonymous> ([eval]-wrapper:6:22)
           at Module._compile (module.js:456:26)
           at evalScript (node.js:536:25)
           at startup (node.js:80:7)
           at node.js:906:3

       node-pre-gyp ERR! Testing pre-built binary failed, attempting to source compile 
       make: Entering directory `/tmp/build_762e588f-64f4-471d-90ab-3cda8f92929c/node_modules/tilestream/node_modules/mbtiles/node_modules/sqlite3/build'
         ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3080500/sqlite3.c
         TOUCH Release/obj.target/deps/action_before_build.stamp
         CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3080500/sqlite3.o
         AR(target) Release/obj.target/deps/sqlite3.a
         COPY Release/sqlite3.a
         CXX(target) Release/obj.target/node_sqlite3/src/database.o
         CXX(target) Release/obj.target/node_sqlite3/src/node_sqlite3.o
         CXX(target) Release/obj.target/node_sqlite3/src/statement.o
         SOLINK_MODULE(target) Release/obj.target/node_sqlite3.node
         SOLINK_MODULE(target) Release/obj.target/node_sqlite3.node: Finished
         COPY Release/node_sqlite3.node
         COPY /tmp/build_762e588f-64f4-471d-90ab-3cda8f92929c/node_modules/tilestream/node_modules/mbtiles/node_modules/sqlite3/lib/binding/node-v11-linux-x64/node_sqlite3.node
         TOUCH Release/obj.target/action_after_build.stamp
       make: Leaving directory `/tmp/build_762e588f-64f4-471d-90ab-3cda8f92929c/node_modules/tilestream/node_modules/mbtiles/node_modules/sqlite3/build'
       tilestream@1.1.0 node_modules/tilestream
       ├── sphericalmercator@1.0.2
       ├── step@0.0.5
       ├── underscore@1.1.7
       ├── modestmaps@0.21.0
       ├── wax@4.1.3
       ├── tilelive@4.3.3 (generic-pool@1.0.12, optimist@0.3.7, underscore@1.3.3)
       ├── bones@1.3.29 (optimist@0.6.1, mirror@0.3.3, backbone@0.3.3, express@2.5.11, jquery@1.6.3)
       └── mbtiles@0.2.9 (underscore@1.5.2, sqlite3@2.2.7)
-----> Caching node_modules directory for future builds
-----> Cleaning up node-gyp and npm artifacts
-----> Building runtime environment
-----> Discovering process types
       Procfile declares types -> web

-----> Compressing... done, 22.8MB
-----> Launching... done, v3
       http://radiant-thicket-3365.herokuapp.com/ deployed to Heroku

当我到达网站时,我得到了错误(检查here

我还检查了日志:

2014-10-18T09:28:04+00:00 heroku[slug-compiler]: Slug compilation finished
2014-10-18T09:28:08.367634+00:00 heroku[web.1]: Starting process with command `tilestream --host radiant-thicket-3365.herokuapp.com --uiPort=45238 --tilePort=45238 --tiles=./tiles`
2014-10-18T09:28:10.563721+00:00 app[web.1]: 
2014-10-18T09:28:10.564646+00:00 app[web.1]:   window = window || require('jsdom').jsdom().createWindow();
2014-10-18T09:28:10.564721+00:00 app[web.1]:                                               ^
2014-10-18T09:28:10.567663+00:00 app[web.1]: TypeError: Object [ null ] has no method 'createWindow'
2014-10-18T09:28:10.567666+00:00 app[web.1]:     at create (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5:47)
2014-10-18T09:28:10.567668+00:00 app[web.1]:     at /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:9065:18
2014-10-18T09:28:10.567670+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:9067:2)
2014-10-18T09:28:10.567673+00:00 app[web.1]:     at
 Object.Module._extensions..js (module.js:474:10)
2014-10-18T09:28:10.567671+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2014-10-18T09:28:10.567674+00:00 app[web.1]:     at Module.load (module.js:356:32)
2014-10-18T09:28:10.567676+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2014-10-18T09:28:10.567678+00:00 app[web.1]:     at Module.require (module.js:364:17)
2014-10-18T09:28:10.567679+00:00 app[web.1]:     at require (module.js:380:17)
2014-10-18T09:28:10.567681+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/tilestream/node_modules/bones/bones.js:6:13)
2014-10-18T09:28:10.564396+00:00 app[web.1]: /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5
2014-10-18T09:28:11.432210+00:00 heroku[web.1]: Process exited with status 8
2014-10-18T09:28:11.443344+00:00 heroku[web.1]: State changed from starting to crashed
2014-10-18T09:28:11.443902+00:00 heroku[web.1]: State changed from crashed to starting
2014-10-18T09:28:14.210694+00:00 heroku[web.1]: Starting process with command `tilestream --host radiant-thicket-3365.herokuapp.com --uiPort=41359 --tilePort=41359 --tiles=./tiles`
2014-10-18T09:28:15.565683+00:00 app[web.1]: /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5
2014-10-18T09:28:15.564911+00:00 app[web.1]: 
2014-10-18T09:28:15.569832+00:00 app[web.1]:     at create (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5:47)
2014-10-18T09:28:15.569834+00:00 app[web.1]:     at /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:9065:18
2014-10-18T09:28:15.569836+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:9067:2)
2014-10-18T09:28:15.569838+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2014-10-18T09:28:15.569840+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:474:10)
2014-10-18T09:28:15.566092+00:00 app[web.1]:   window = window || require('jsdom').jsdom().createWindow();
2014-10-18T09:28:15.569842+00:00 app[web.1]:     at Module.load (module.js:356:32)
2014-10-18T09:28:15.566881+00:00 app[web.1]:                                               ^
2014-10-18T09:28:15.569828+00:00 app[web.1]: TypeError: Object [ null ] has no method 'createWindow'
2014-10-18T09:28:15.569844+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2014-10-18T09:28:15.569846+00:00 app[web.1]:     at Module.require (module.js:364:17)
2014-10-18T09:28:15.569847+00:00 app[web.1]:     at require (module.js:380:17)
2014-10-18T09:28:15.569849+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/tilestream/node_modules/bones/bones.js:6:13)
2014-10-18T09:28:16.299392+00:00 heroku[web.1]: Process exited with status 8
2014-10-18T09:28:16.311888+00:00 heroku[web.1]: State changed from starting to crashed
2014-10-18T09:28:18.072250+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=radiant-thicket-3365.herokuapp.com request_id=618fd5ea-76fa-405e-b5a3-d42954b33cca fwd="54.221.129.200" dyno= connect= service= status=503 bytes=
2014-10-18T09:28:19.392456+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=radiant-thicket-3365.herokuapp.com request_id=b707e755-bbea-407e-ad24-47093ab64c8c fwd="93.108.206.124" dyno= connect= service= status=503 bytes=
2014-10-18T09:28:19.922939+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=radiant-thicket-3365.herokuapp.com request_id=ab857060-3f1f-457e-9b10-73c6e34bb9ea fwd="93.108.206.124" dyno= connect= service= status=503 bytes=
2014-10-18T09:34:33.161866+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=radiant-thicket-3365.herokuapp.com request_id=dee11dd3-7ecf-4709-9daf-65bc0656f95f fwd="93.108.206.124" dyno= connect= service= status=503 bytes=
2014-10-18T09:34:41.543944+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=radiant-thicket-3365.herokuapp.com request_id=9ad82ed6-bb84-4683-8710-9d8bcf72f746 fwd="93.108.206.124" dyno= connect= service= status=503 bytes=

在heroku上运行的进程:

=== web (1X): `tilestream --host radiant-thicket-3365.herokuapp.com --uiPort=$PORT --tilePort=$PORT --tiles=./tiles`
web.1: crashed 2014/10/18 10:28:15 (~ 9m ago)

我没有为这个例子将地图上传到./tiles目录,但即使我这样做,我仍然会得到同样的错误。

任何一个有意想不到的人?

我所遵循的教程是这些(并且它们仍然正常运行): Tutorial 1 Tutorial 2

还将jsdom依赖项添加到package.json中,如下所示:

 {
  "name": "myTest",
  "version": "0.0.1",
  "engines": {
    "node": "0.10.x"
 },
 "dependencies": {
    "jsdom": "0.8.x",
    "tilestream": "1.1.0"
  }
}

虽然部署没有任何错误,但即使在打开浏览器之前,结果仍然如下:

2014-10-18T10:26:36.188462+00:00 heroku[web.1]: State changed from crashed to starting
2014-10-18T10:26:38.531582+00:00 heroku[web.1]: Starting process with command `tilestream --host radiant-thicket-3365.herokuapp.com --uiPort=10561 --tilePort=10561 --tiles=./tiles`
2014-10-18T10:26:40.243590+00:00 app[web.1]: 
2014-10-18T10:26:40.244913+00:00 app[web.1]:   window = window || require('jsdom').jsdom().createWindow();
2014-10-18T10:26:40.248039+00:00 app[web.1]: TypeError: Object [ null ] has no method 'createWindow'
2014-10-18T10:26:40.248045+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:9067:2)
2014-10-18T10:26:40.248048+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:474:10)
2014-10-18T10:26:40.248047+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2014-10-18T10:26:40.245036+00:00 app[web.1]:                                               ^
2014-10-18T10:26:40.248051+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2014-10-18T10:26:40.248042+00:00 app[web.1]:     at create (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5:47)
2014-10-18T10:26:40.248053+00:00 app[web.1]:     at Module.require (module.js:364:17)
2014-10-18T10:26:40.248055+00:00 app[web.1]:     at require (module.js:380:17)
2014-10-18T10:26:40.248043+00:00 app[web.1]:     at /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:9065:18
2014-10-18T10:26:40.248056+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/tilestream/node_modules/bones/bones.js:6:13)
2014-10-18T10:26:40.248049+00:00 app[web.1]:     at Module.load (module.js:356:32)
2014-10-18T10:26:40.244512+00:00 app[web.1]: /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5
2014-10-18T10:26:41.041333+00:00 heroku[web.1]: Process exited with status 8
2014-10-18T10:26:41.055570+00:00 heroku[web.1]: State changed from starting to crashed
2014-10-18T10:26:41.057386+00:00 heroku[web.1]: State changed from crashed to starting
2014-10-18T10:26:43.839795+00:00 heroku[web.1]: Starting process with command `tilestream --host radiant-thicket-3365.herokuapp.com --uiPort=22580 --tilePort=22580 --tiles=./tiles`
2014-10-18T10:26:45.170705+00:00 app[web.1]: 
2014-10-18T10:26:45.175559+00:00 app[web.1]:   window = window || require('jsdom').jsdom().createWindow();
2014-10-18T10:26:45.175674+00:00 app[web.1]:                                               ^
2014-10-18T10:26:45.181594+00:00 app[web.1]: TypeError: Object [ null ] has no method 'createWindow'
2014-10-18T10:26:45.181597+00:00 app[web.1]:     at create (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5:47)
2014-10-18T10:26:45.181599+00:00 app[web.1]:     at /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:9065:18
2014-10-18T10:26:45.181601+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:9067:2)
2014-10-18T10:26:45.181603+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2014-10-18T10:26:45.181606+00:00 app[web.1]:     at Module.load (module.js:356:32)
2014-10-18T10:26:45.181604+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:474:10)
2014-10-18T10:26:45.181608+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2014-10-18T10:26:45.181610+00:00 app[web.1]:     at Module.require (module.js:364:17)
2014-10-18T10:26:45.181611+00:00 app[web.1]:     at require (module.js:380:17)
2014-10-18T10:26:45.181613+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/tilestream/node_modules/bones/bones.js:6:13)
2014-10-18T10:26:45.172165+00:00 app[web.1]: /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5
2014-10-18T10:26:46.025714+00:00 heroku[web.1]: State changed from starting to crashed
2014-10-18T10:26:46.014797+00:00 heroku[web.1]: Process exited with status 8
2014-10-18T10:26:47.627660+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=radiant-thicket-3365.herokuapp.com request_id=19bcb723-eda6-46b6-ae2a-5f0f4b51074a fwd="54.221.129.200" dyno= connect= service= status=503 bytes=

似乎是一个已知问题(描述为here)所以将package.json更改为:

 {
  "name": "myTest",
  "version": "0.0.1",
  "engines": {
  "node": "0.8.x"
 },
 "dependencies": {
 "tilestream": "1.1.0",
 "jsdom": "0.11.x"
  }
}

它仍然无法正常工作,日志如下:

2014-10-18T10:45:06.146488+00:00 heroku[api]: Deploy bf1c8d8 by XPTO@XPTO.com
2014-10-18T10:45:06.443456+00:00 heroku[web.1]: State changed from crashed to starting
2014-10-18T10:45:09.524946+00:00 heroku[web.1]: Starting process with command `tilestream --host radiant-thicket-3365.herokuapp.com --uiPort=31195 --tilePort=31195 --tiles=./tiles`
2014-10-18T10:45:11.187180+00:00 app[web.1]: /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5
2014-10-18T10:45:11.191140+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:9067:2)
2014-10-18T10:45:11.188230+00:00 app[web.1]:                                               ^
2014-10-18T10:45:11.191132+00:00 app[web.1]: TypeError: Object [ null ] has no method 'createWindow'
2014-10-18T10:45:11.191139+00:00 app[web.1]:     at /app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:9065:18
2014-10-18T10:45:11.186177+00:00 app[web.1]: 
2014-10-18T10:45:11.187555+00:00 app[web.1]:   window = window || require('jsdom').jsdom().createWindow();
2014-10-18T10:45:11.191137+00:00 app[web.1]:     at create (/app/node_modules/tilestream/node_modules/bones/node_modules/jquery/node-jquery.js:5:47)
2014-10-18T10:45:11.191141+00:00 app[web.1]:     at Module._compile (module.js:449:26)
2014-10-18T10:45:11.191143+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:467:10)
2014-10-18T10:45:11.191144+00:00 app[web.1]:     at Module.load (module.js:356:32)
2014-10-18T10:45:11.191148+00:00 app[web.1]:     at require (module.js:378:17)
2014-10-18T10:45:11.191150+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/tilestream/node_modules/bones/bones.js:6:13)
2014-10-18T10:45:11.191146+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2014-10-18T10:45:11.191147+00:00 app[web.1]:     at Module.require (module.js:362:17)
2014-10-18T10:45:12.026513+00:00 heroku[web.1]: Process exited with status 1
2014-10-18T10:45:12.038387+00:00 heroku[web.1]: State changed from starting to crashed
2014-10-18T10:45:13.302865+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=radiant-thicket-3365.herokuapp.com request_id=36133ed4-3ad9-4561-ac3e-a1ea6b09c0ed fwd="93.108.206.124" dyno= connect= service= status=503 bytes=

1 个答案:

答案 0 :(得分:0)

更改package.json文件,如下所示。

 {
  "name": "myTest",
  "version": "0.0.1",
  "engines": {
  "node": "0.10.x"
 }
 "dependencies": {
 "tilestream": "1.1.0"
  }
}

猜猜这有帮助。