enjalot / blockbuilder

Create, fork and edit d3.js code snippets for use with bl.ocks.org right in the browser, no terminal required.
Other
323 stars 59 forks source link

update handlebars config in server.js. fix #234 #235

Closed micahstubbs closed 5 years ago

micahstubbs commented 5 years ago

This PR updates the way that we tell handlebars where to look for the main or base template. It fixes a bug that appears when we try to run blockbuilder on node v12.3.0. (the current latest nodejs).

This PR also unblocks the nice work that @hydrosquall has been doing on in the blockbuilder-search UI repo to update our dependencies there and improve developer experience 😄

fix #234

steps to test

# if you haven't already, first install nvm https://github.com/nvm-sh/nvm
# then install the latest nodejs
nvm install 12.3.0

then

cd blockbuilder
yarn 
yarn buildWatch

# open a new terminal window
cd ../blockbuilder-search
yarn
yarn buildWatch

# open another new terminal window
cd blockbuilder
node server.js

then make sure that both local blockbuilder and local blockbuilder-search render by visiting them in the browser:

http://localhost:8889/ http://localhost:8889/search

micahstubbs commented 5 years ago

before

Screen Shot 2019-05-21 at 10 43 22 PM

micahstubbs commented 5 years ago

after

after-Screen Shot 2019-05-21 at 10 42 48 PM

pavelloz commented 5 years ago

When i tried to yarn, node-sass (in particular fsevents) threw me a lot of weird compiling errors.

It supposed to be fixed in 4.12.0 ( https://github.com/sass/node-sass/issues/2632 ) so i would recommend upgrade of that dependency.

When i changed it to 4.12.0 in package.json and tried again it didnt help, but i dont know how to use yarn - maybe it requires some additional action.

npm install node-sass worked like a charm, yarn add node-sass breaks.

Note: Im using fnm not nvm, but i assume its not a problem :)

hydrosquall commented 5 years ago

I suspect that yarn installing node-sass errored because it was installing the version specified in yarn.lock, whereas npm succeeded because there was no package-lock.json to make it reinstall the old version.

Note there is an issue with node-sass and this project in #233 that upgrading to 4.12.0 may solve as well (this might be the fsevents error you ran into).

On Wed, May 22, 2019 at 6:12 AM Paweł Kowalski notifications@github.com wrote:

When i tried to yarn, node-sass (in particular fsevents) threw me a lot of weird compiling errors.

It supposed to be fixed in 4.12.0 ( sass/node-sass#2632 https://github.com/sass/node-sass/issues/2632 ) so i would recommend upgrade of that dependency.

When i changed it to 4.12.0 in package.json and tried again it didnt help, but i dont know how to use yarn - maybe it requires some additional action.

npm install node-sass worked like a charm, yarn add node-sass breaks.

Note: Im using fnm not nvm, but i assume its not a problem :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/enjalot/blockbuilder/pull/235?email_source=notifications&email_token=ACE2MM3PFNY7J7KQ3JQUEQ3PWUMABA5CNFSM4HOQ3ACKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV6SOHI#issuecomment-494741277, or mute the thread https://github.com/notifications/unsubscribe-auth/ACE2MMY65RWZ3XOD5S6BPS3PWUMABANCNFSM4HOQ3ACA .

micahstubbs commented 5 years ago

thanks for the reviews @pavelloz @hydrosquall @enjalot 🙏

hopefully @hydrosquall is right and upgrading can resolve this node-sass compiling pain 😅