Skip to content

Instantly share code, notes, and snippets.

@karladler
Last active January 8, 2020 09:29
Show Gist options
  • Save karladler/166f161f43997dd77669a08a01ebf357 to your computer and use it in GitHub Desktop.
Save karladler/166f161f43997dd77669a08a01ebf357 to your computer and use it in GitHub Desktop.
evan.network Trouble shooting

Solve common UI problems on local development

node-sass build failed

Problem:

Error: Missing binding /Users/.../ui/ui-dapp-browser/node_modules/node-sass/vendor/darwin-x64-72/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 12.x

Found bindings for the following environments:
  - OS X 64-bit with Node.js 11.x

Solution:

npm rebuild node-sass

No gulpfile found

link modules in the folder(s) where the error appears

yarn link @evan.network/angular-gulp; yarn link @evan.network/api-blockchain-core; yarn link @evan.network/dbcp; yarn link @evan.network/smart-contracts-admin; yarn link @evan.network/smart-contracts-core; yarn link @evan.network/task; yarn link @evan.network/taskboard; yarn link @evan.network/ui-angular-core; yarn link @evan.network/ui-angular-libs; yarn link @evan.network/ui-angular-sass; yarn link @evan.network/ui-dapp-browser; yarn link @evan.network/ui-tests; yarn link @evan.network/ui-vue-core; yarn link @evan.network/ui;

Standard procedure for common errors like

  • Can not read property XXX of undefined
  • XXX of undefined is not a function
  • module XXX not found

update all branches

  git pull
  gr git pull

delete externals from dev-environment folder

  cd node_modules/@evan.network/ui-dapp-browser/runtime
  rm -rf external

delete bcc from ui/ui-dapp-browser

  rm -rf runtime/external/bcc

re-install all modules

  rm -rf node_modules
  yarn install // yarn install --check-files

unexpected end of file ... during yarn install

  • clean the yarn cache (optional)
  • do not install at the same time in multiple command line windows
  • try again and again as this errors seems to occur with a uncertain probability ...
  yarn cache clean

weird linked modules

Unlink all linked yarn modules: (check before that there are no ones you need for other projects)

  cd ~/.config/yarn/link
  rm -r *

Register and link modules again in dev-environment

  . scripts/register-api
  . scripts/register-ui
  . scripts/link-all

Error: Cannot find module 'terser/lib/utils.js' rebuilding dapp-browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment