GithubHelp home page GithubHelp logo

ebaydapp's Introduction

truffle-init-webpack

Example webpack project with Truffle. Includes contracts, migrations, tests, user interface and webpack build pipeline.

Usage

To initialize a project with this example, run truffle init webpack inside an empty directory.

Building and the frontend

  1. First run truffle compile, then run truffle migrate to deploy the contracts onto your network of choice (default "development").
  2. Then run npm run dev to build the app and serve it on http://localhost:8080

Possible upgrades

  • Use the webpack hotloader to sense when contracts or javascript have been recompiled and rebuild the application. Contributions welcome!

Common Errors

  • Error: Can't resolve '../build/contracts/MetaCoin.json'

This means you haven't compiled or migrated your contracts yet. Run truffle compile and truffle migrate first.

Full error:

ERROR in ./app/main.js
Module not found: Error: Can't resolve '../build/contracts/MetaCoin.json' in '/Users/tim/Documents/workspace/Consensys/test3/app'
 @ ./app/main.js 11:16-59

ebaydapp's People

Contributors

ohjia avatar

Stargazers

豌豆儿 avatar

Watchers

James Cloos avatar  avatar

Forkers

scuba323

ebaydapp's Issues

Compile Error

Environment (truffle)

Truffle v5.1.54 (core: 5.1.54)
Solidity - 0.4.12 (solc-js)
Node v10.23.0
Web3.js v1.2.9

Steps to reproduce:

  1. git clone https://github.com/OhJia/ebayDapp
  2. npm i
  3. truffle compile

Expected Output:

Successful Compile

Actual Output:

CompileError: /var/www/ebayDapp/contracts/EcommerceStore.sol:58:47: : Expected token LBrace got 'View'
  function getProductInfo(uint _productIndex) view public returns (uint, string, string, string, string, uint, uint) {
                                              ^
,/var/www/ebayDapp/contracts/Escrow.sol:30:25: : Expected token LBrace got 'View'
  function escrowInfo() view public returns (address, address, address, uint, bool, uint, uint){
                        ^

Compilation failed. See above.
    at run (/usr/lib/node_modules/truffle/build/webpack:/packages/compile-solidity/run.js:51:1)
Truffle v5.1.54 (core: 5.1.54)
Node v10.23.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.