Wiki: Heroku Cloud Install doesn't work

Created on 27 Jul 2017  路  4Comments  路  Source: Requarks/wiki

I was really excited when I saw that Wiki.js offers a cloud installer for Heroku. Deploying such a nice wiki system with just a few clicks would be fantastic and a huge win! Unfortunatly it doesn't work.

Heroku shows that the app was deployed successfully:

unbenannt

But when I checkout my application I only see the Application error default page from Heroku.

I checked the logs on Heroku and they show the following:

heroku logs --source app --tail --app=my-wiki

2017-07-26T22:05:08.830501+00:00 app[api]: Initial release by user [email protected]
2017-07-26T22:05:09.379535+00:00 app[api]: Release v2 created by user [email protected]
2017-07-26T22:05:09.468213+00:00 app[api]: Release v3 created by user [email protected]
2017-07-26T22:05:08.830501+00:00 app[api]: Release v1 created by user [email protected]
2017-07-26T22:05:09.468213+00:00 app[api]: Enable Logplex by user [email protected]
2017-07-26T22:05:09.379535+00:00 app[api]: Set WIKI_TITLE, WIKI_HOST, WIKI_LANG, WIKI_IS_PUBLIC, WIKI_GIT_URL, WIKI_GIT_BRANCH, WIKI_GIT_USERNAME, WIKI_GIT_PASSWORD, WIKI_SERVER_EMAIL, WIKI_SHOW_USER_EMAIL, WIKI_ADMIN_EMAIL, WIKI_SESSION_KEY, WIKI_JS_HEROKU config vars by user [email protected]
2017-07-26T22:05:14.376988+00:00 app[api]: Release v4 created by user [email protected]
2017-07-26T22:05:14.376988+00:00 app[api]: Attach MongoDB (@ref:mongolab-slippery-89686) by user [email protected]
2017-07-26T22:05:15.000000+00:00 app[api]: Build started by user [email protected]
2017-07-26T22:06:54.702687+00:00 app[api]: Scaled to web@1:Free by user [email protected]
2017-07-26T22:06:54.685006+00:00 app[api]: Deploy by user [email protected]
2017-07-26T22:05:15.000000+00:00 app[api]: Build succeeded
2017-07-26T22:06:54.685006+00:00 app[api]: Release v5 created by user [email protected]
2017-07-26T22:07:03.314688+00:00 app[web.1]: 2017-07-26T22:07:03.312Z - info: [SERVER] Wiki.js is initializing...
2017-07-26T22:07:03.501205+00:00 app[web.1]: 2017-07-26T22:07:03.500Z - info: [SERVER] Checking data directories...
2017-07-26T22:07:03.501843+00:00 app[web.1]: 2017-07-26T22:07:03.501Z - info: [SERVER] Data and Repository directories are OK.
2017-07-26T22:07:03.888881+00:00 app[web.1]: 2017-07-26T22:07:03.888Z - info: [SERVER] Checking Git repository...
2017-07-26T22:07:03.974098+00:00 app[web.1]: module.js:487
2017-07-26T22:07:03.974101+00:00 app[web.1]: throw err;
2017-07-26T22:07:03.974101+00:00 app[web.1]: ^
2017-07-26T22:07:03.974102+00:00 app[web.1]:
2017-07-26T22:07:03.974103+00:00 app[web.1]: Error: Cannot find module 'tough-cookie'
2017-07-26T22:07:03.974107+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:485:15)
2017-07-26T22:07:03.974108+00:00 app[web.1]: at Function.Module._load (module.js:437:25)
2017-07-26T22:07:03.974108+00:00 app[web.1]: at Module.require (module.js:513:17)
2017-07-26T22:07:03.974109+00:00 app[web.1]: at require (internal/module.js:11:18)
2017-07-26T22:07:03.974110+00:00 app[web.1]: at Object. (/app/node_modules/jsdom/lib/jsdom.js:8:19)
2017-07-26T22:07:03.974111+00:00 app[web.1]: at Module._compile (module.js:569:30)
2017-07-26T22:07:03.974111+00:00 app[web.1]: at Object.Module._extensions..js (module.js:580:10)
2017-07-26T22:07:03.974112+00:00 app[web.1]: at Module.load (module.js:503:32)
2017-07-26T22:07:03.974112+00:00 app[web.1]: at tryModuleLoad (module.js:466:12)
2017-07-26T22:07:03.974113+00:00 app[web.1]: at Function.Module._load (module.js:458:3)
2017-07-26T22:07:03.974113+00:00 app[web.1]: at Module.require (module.js:513:17)
2017-07-26T22:07:03.974114+00:00 app[web.1]: at require (internal/module.js:11:18)
2017-07-26T22:07:03.974114+00:00 app[web.1]: at Object. (/app/node_modules/mathjax-node/lib/main.js:33:13)
2017-07-26T22:07:03.974115+00:00 app[web.1]: at Module._compile (module.js:569:30)
2017-07-26T22:07:03.974116+00:00 app[web.1]: at Object.Module._extensions..js (module.js:580:10)
2017-07-26T22:07:03.974116+00:00 app[web.1]: at Module.load (module.js:503:32)
2017-07-26T22:07:03.974117+00:00 app[web.1]: at tryModuleLoad (module.js:466:12)
2017-07-26T22:07:03.974117+00:00 app[web.1]: at Function.Module._load (module.js:458:3)
2017-07-26T22:07:03.974118+00:00 app[web.1]: at Module.require (module.js:513:17)
2017-07-26T22:07:03.974118+00:00 app[web.1]: at require (internal/module.js:11:18)
2017-07-26T22:07:03.974120+00:00 app[web.1]: at Module._compile (module.js:569:30)
2017-07-26T22:07:03.974119+00:00 app[web.1]: at Object. (/app/server/libs/markdown.js:16:17)
2017-07-26T22:07:14.803177+00:00 app[web.1]: 2017-07-26T22:07:14.801Z - info: [SERVER] Wiki.js is initializing...
2017-07-26T22:07:15.104400+00:00 app[web.1]: 2017-07-26T22:07:15.104Z - info: [SERVER] Checking data directories...
2017-07-26T22:07:15.105350+00:00 app[web.1]: 2017-07-26T22:07:15.105Z - info: [SERVER] Data and Repository directories are OK.
2017-07-26T22:07:15.831235+00:00 app[web.1]: 2017-07-26T22:07:15.830Z - info: [SERVER] Checking Git repository...
2017-07-26T22:07:15.935862+00:00 app[web.1]: module.js:487
2017-07-26T22:07:15.935865+00:00 app[web.1]: throw err;
2017-07-26T22:07:15.935868+00:00 app[web.1]: Error: Cannot find module 'tough-cookie'
2017-07-26T22:07:15.935866+00:00 app[web.1]:
2017-07-26T22:07:15.935868+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:485:15)
2017-07-26T22:07:15.935872+00:00 app[web.1]: at Module._compile (module.js:569:30)
2017-07-26T22:07:15.935866+00:00 app[web.1]: ^
2017-07-26T22:07:15.935874+00:00 app[web.1]: at Function.Module._load (module.js:458:3)
2017-07-26T22:07:15.935873+00:00 app[web.1]: at tryModuleLoad (module.js:466:12)
2017-07-26T22:07:15.935869+00:00 app[web.1]: at Function.Module._load (module.js:437:25)
2017-07-26T22:07:15.935869+00:00 app[web.1]: at Module.require (module.js:513:17)
2017-07-26T22:07:15.935870+00:00 app[web.1]: at require (internal/module.js:11:18)
2017-07-26T22:07:15.935874+00:00 app[web.1]: at Module.require (module.js:513:17)
2017-07-26T22:07:15.935876+00:00 app[web.1]: at Object. (/app/node_modules/mathjax-node/lib/main.js:33:13)
2017-07-26T22:07:15.935875+00:00 app[web.1]: at require (internal/module.js:11:18)
2017-07-26T22:07:15.935871+00:00 app[web.1]: at Object. (/app/node_modules/jsdom/lib/jsdom.js:8:19)
2017-07-26T22:07:15.935877+00:00 app[web.1]: at Object.Module._extensions..js (module.js:580:10)
2017-07-26T22:07:15.935872+00:00 app[web.1]: at Object.Module._extensions..js (module.js:580:10)
2017-07-26T22:07:15.935873+00:00 app[web.1]: at Module.load (module.js:503:32)
2017-07-26T22:07:15.935876+00:00 app[web.1]: at Module._compile (module.js:569:30)
2017-07-26T22:07:15.935877+00:00 app[web.1]: at Module.load (module.js:503:32)
2017-07-26T22:07:15.935878+00:00 app[web.1]: at tryModuleLoad (module.js:466:12)
2017-07-26T22:07:15.935880+00:00 app[web.1]: at Object. (/app/server/libs/markdown.js:16:17)
2017-07-26T22:07:15.935897+00:00 app[web.1]: at Module._compile (module.js:569:30)
2017-07-26T22:07:15.935878+00:00 app[web.1]: at Function.Module._load (module.js:458:3)
2017-07-26T22:07:15.935879+00:00 app[web.1]: at Module.require (module.js:513:17)
2017-07-26T22:07:15.935879+00:00 app[web.1]: at require (internal/module.js:11:18)

bug

All 4 comments

Fixed in 1.0.4 (4ffaaf40e1e7f332dd67d868631066ac1a23ae6c)

Try Deploy to Heroku button again, it should work now.

After a fresh Deploy to Heroku, I got the same default application error page after a successful deploy. The tail of the log showed nothing useful (unsure how to view more of the Heroku log). Restarting the dynos results in this:

2017-08-04T01:37:33.406771+00:00 heroku[web.1]: Starting process with command node server
2017-08-04T01:37:35.289403+00:00 app[web.1]: module.js:487
2017-08-04T01:37:35.289421+00:00 app[web.1]: throw err;
2017-08-04T01:37:35.289422+00:00 app[web.1]: ^
2017-08-04T01:37:35.289422+00:00 app[web.1]:
2017-08-04T01:37:35.289423+00:00 app[web.1]: Error: Cannot find module 'js-yaml'
2017-08-04T01:37:35.289424+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:485:15)
2017-08-04T01:37:35.289425+00:00 app[web.1]: at Function.Module._load (module.js:437:25)
2017-08-04T01:37:35.289426+00:00 app[web.1]: at Module.require (module.js:513:17)
2017-08-04T01:37:35.289426+00:00 app[web.1]: at require (internal/module.js:11:18)
2017-08-04T01:37:35.289427+00:00 app[web.1]: at Object. (/app/server/libs/config.js:4:14)
2017-08-04T01:37:35.289427+00:00 app[web.1]: at Module._compile (module.js:569:30)
2017-08-04T01:37:35.289427+00:00 app[web.1]: at Object.Module._extensions..js (module.js:580:10)
2017-08-04T01:37:35.289428+00:00 app[web.1]: at Module.load (module.js:503:32)
2017-08-04T01:37:35.289428+00:00 app[web.1]: at tryModuleLoad (module.js:466:12)
2017-08-04T01:37:35.289429+00:00 app[web.1]: at Function.Module._load (module.js:458:3)
2017-08-04T01:37:35.354882+00:00 heroku[web.1]: State changed from starting to crashed

       =============================
       WIKI.JS - HEROKU INSTALLATION
       =============================
       -> Fetching latest build...

       gzip: stdin: not in gzip format
       tar: Child returned status 1
       tar: Error is not recoverable: exiting now
       -> Fetching dependencies...

Just tried myself and it is failing because script is expecting a gzip file?

the script says latest stable is 1.0.117 but all I see in releases is v1.0.102. So, script is not able to find files.

I ended making a fork of wiki-heroku and editing the readme.md and install.sh:

1) readme.md points to your own heroku deploy repo. Instead of https://github.com/requarks/wiki-heroku change requarks to your own github URL
2) change install.sh to point to v1.0.102 explicitly:
a) curl -L -s -S https://github.com/Requarks/wiki/releases/download/v1.0.102/wiki-js.tar.gz | tar xz -C ./wiki
b) curl -L -s -S https://github.com/Requarks/wiki/releases/download/v1.0.102/node_modules.tar.gz | tar xz -C ./wiki

I tried to install the beta wiki-js.tar.gz but the build failed.

image

@sunk818 Fixed install script.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leandro-hermes picture leandro-hermes  路  4Comments

ccolella-mdc picture ccolella-mdc  路  3Comments

den1622 picture den1622  路  3Comments

gruesomehit picture gruesomehit  路  4Comments

LionNatsu picture LionNatsu  路  3Comments