naturalcrit / homebrewery

Create authentic looking D&D homebrews using only markdown
https://homebrewery.naturalcrit.com
MIT License
1.06k stars 326 forks source link

Problems building from the Repository #442

Closed HeruAsatru closed 7 years ago

HeruAsatru commented 7 years ago

Hey,

so I'm trying to get the homebrewery to run on my raspberry pi 3, running raspbian jessie lite vJuly 2017 and am running into some issues. I already checked this issue https://github.com/stolksdorf/homebrewery/issues/424 and removing the .partial worked to get me around the first issue, where i would get the error

lib is not a function

Now I'm getting one step further with my npm install , just to get the next error:

/var/www/homebrewery/nodemodules/vitreum/steps/jsx.js:8 if(!.isPlainObject(opts)) throw 'JSX step: opts must be an object'; ^ JSX step: opts must be an object npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! homebrewery@2.7.4 build: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the homebrewery@2.7.4 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2017-07-14T19_16_51_294Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! homebrewery@2.7.4 postinstall: npm run build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the homebrewery@2.7.4 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2017-07-14T19_16_51_529Z-debug.log

Additional info: pi@deskpi3:~ $ npm -v 5.0.3

pi@deskpi3:~ $ node -v v8.1.4

pi@deskpi3:~ $ mongo --version MongoDB shell version: 2.4.10

If someone has any idea what I could try, I would be very thankful.

best regards

spencerbaynton commented 7 years ago

I was able to get mine to build by rewriting part of the scripts/build.js code. It does seem to have been an issue with Vitreum.

const label = 'build';
console.time(label);

const steps = require('vitreum/steps');

const Proj = require('./project.json');

steps.clean()
    .then(steps.libs(Proj.libs))
    .then(steps.jsx('homebrew', './client/homebrew/homebrew.jsx', {libs : Proj.libs, shared : Proj.shared})
        .then((deps)=>steps.less('homebrew', {shared : Proj.shared}, deps))
    )
    .then(steps.jsx('admin', './client/admin/admin.jsx', {libs : Proj.libs, shared : Proj.shared})
        .then((deps)=>steps.less('admin', {shared : Proj.shared}, deps))
    )
    .then(steps.assets(Proj.assets, ['./shared', './client']))
    .then(console.timeEnd.bind(console, label))
    .catch(console.error);

Also, add "./shared" to the "shared" array in scripts/project.json.

HeruAsatru commented 7 years ago

This works, thank you very much. There are still deprecation warnings for mongoose and react, but at least the homebrewery works :) I guess we will have to wait until @stolksdorf releases the new version... :)