Consensys / Token-Factory

Basic Token Factory dapp.
479 stars 308 forks source link

I tried to run token factory in docker container but it did not work. #59

Open zono opened 6 years ago

zono commented 6 years ago

Summary

I got HumanStandardToken is not defined error when I tried to run token factory in docker container. Can you help me with my issue?

Steps to Reproduce

  1. git clone https://github.com/ConsenSys/Token-Factory.git
  2. create Dockerfile
  3. create docker-compose.yml
  4. docker exec. $docker exec -it token-factory /bin/bash
  5. change opts.useFsEvents = false. #vim /usr/local/lib/node_modules/truffle/build/cli.bundled.js (*1)
  6. truffle serve
  7. access localhost:8080 and create token
FROM node:latest

RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install vim -y
RUN npm install
RUN npm install -g webpack
RUN npm install -g truffle
version: '3.4'

services:
  app:
    build: .
    tty: true
    image: token-factory:latest
    container_name: token-factory
    working_dir: /home/node/app
    volumes:
      - ./Token-Factory/:/home/node/app
    ports:
      - "8080:8080"
// Enable fsevents on OS X when polling isn't explicitly enabled.
//if (undef('useFsEvents')) opts.useFsEvents = !opts.usePolling;

// If we can't use fsevents, ensure the options reflect it's disabled.
//if (!FsEventsHandler.canUse()) opts.useFsEvents = false;
opts.useFsEvents = false

*1 https://github.com/trufflesuite/truffle/issues/734

Expected Results

No error occurred.

Actual Results

HumanStandardToken is not defined error occurred.

app.js:50443 Uncaught ReferenceError: HumanStandardToken is not defined
    at Constructor.executeFunction (app.js:50443)
    at Object.ReactErrorUtils.invokeGuardedCallback (app.js:12386)

2018-02-06 11 17 10

zono commented 6 years ago

I found the similar issue (https://github.com/ConsenSys/Token-Factory/issues/49) and paritygeeker's suggestion fixed my issue.

  1. truffle serve
  2. replace /home/node/app/build/app.js (wget https://tokenfactory.surge.sh/app.js)