Giter Site home page Giter Site logo

quintor / angular-truffle-box Goto Github PK

View Code? Open in Web Editor NEW
78.0 11.0 37.0 3.32 MB

Truffle Box for Angular is a quick-and-easy way to get your Dapp on the road with Truffle and Angular

License: Apache License 2.0

TypeScript 66.07% JavaScript 24.70% HTML 6.18% CSS 0.77% Shell 2.28%

angular-truffle-box's Introduction

Truffle Box for Angular

This Truffle Box provides a base for working with the Truffle Framework and Angular. It provides a basic working example of the MetaCoin contracts with Angular components. This project is generated with Angular CLI.

Prerequisites

In order to run the Truffle box, you will need Node.js (tested with version 10.x.y). This will include npm, needed to install dependencies. In order install these dependencies, you will also need Python (version 2.7.x) and git. You will also need the MetaMask plugin for Chrome.

Building

  1. Install truffle, Angular CLI and an Ethereum client. If you don't have a test environment, we recommend ganache-cli
npm install -g truffle
npm install -g @angular/cli
npm install -g ganache-cli
  1. Download the box.
truffle unbox Quintor/angular-truffle-box
  1. Run your Ethereum client. For Ganache CLI:
ganache-cli

Note the mnemonic 12-word phrase printed on startup, you will need it later.

  1. Compile and migrate your contracts.
truffle compile && truffle migrate

Configuration

  1. In order to connect with the Ethereum network, you will need to configure MetaMask
  2. Log into the ganache-cli test accounts in MetaMask, using the 12-word phrase printed earlier.
    1. A detailed explaination of how to do this can be found here
      1. Normally, the available test accounts will change whenever you restart ganache-cli.
      2. In order to receive the same test accounts every time you start ganache-cli, start it with a seed like this: ganache-cli --seed 0 or ganache-cli -m "put your mnemonic phrase here needs twelve words to work with MetaMask"
  3. Point MetaMask to ganache-cli by connecting to the network localhost:8545

Running

  1. Run the app using Angular CLI:
npm start

The app is now served on localhost:4200

  1. Making sure you have configured MetaMask, visit http://localhost:4200 in your browser.

  2. Send MetaCoins!

Testing

  1. Running the Angular component tests:
ng test
  1. Running the Truffle tests:
truffle test
  1. Running Protactor end-to-end tests
ng e2e

Releasing

Using the Angular CLI you can build a distributable of your app. Will be placed in dist/

ng build

FAQ

  • Where can I find more documentation?

This Truffle box is a union of Truffle and an Angular setup created with Angular CLI. For solidity compilation and Ethereum related issues, try the Truffle documentation. For Angular CLI and typescript issues, refer to the Angular CLI documentation

  • Common errors and their solutions
Error Solution
Module not found: Error: Can't resolve '../../../../build/contracts/MetaCoin.json' during ng serve Run truffle compile
Error: the tx doesn't have the correct nonce. in MetaMask Reset MetaMask: Settings -> Reset Account
Error getting balance; see log. in UI, with Error: MetaCoin has not been deployed to detected network (network/artifact mismatch) in browser console Ensure you have started ganache, run truffle migrate and configured MetaMask to point to ganache
  • How do I get this to work on Windows?

Possible issues:

  • If you're missing a C++ compiler, run npm install --global --production windows-build-tools in a cmd with administrative rights.
  • If the truffle.js file opens when you're trying to run truffle commands, rename the file to truffle-config.js

angular-truffle-box's People

Contributors

angular-cli avatar onlyonejmjq avatar pimotte avatar pjullrich avatar sarbogast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-truffle-box's Issues

this truffle cant work with Metamask since this year (Chrome)

Hello, since the begining of this year I cant use this app with Metamask (chrome) this show this:

1034 web3.service.ts:67 Couldn't get any accounts! Make sure your Ethereum client is configured correctly.

I have using a semi-private network (Alastria) and we have 0 gas cost,
The app work if i use Opera, but in opera i cant configure gas cost to 0.
So i cant run the app correctly.

I have configure a private network with ganache and happend the same.

I have notice this warnings of metamask:

inpage.js:1 MetaMask: MetaMask will stop reloading pages on network change on January 13, 2020. For more information, see: https://medium.com/metamask/no-longer-reloading-pages-on-network-change-fbf041942b44
Set 'ethereum.autoRefreshOnNetworkChange' to 'false' to silence this warning: https://metamask.github.io/metamask-docs/API_Reference/Ethereum_Provider#ethereum.autorefreshonnetworkchange
(anonymous) @ inpage.js:1
setTimeout (async)
MetamaskInpageProvider @ inpage.js:1
(anonymous) @ inpage.js:1
1../lib/auto-reload.js @ inpage.js:1
i @ inpage.js:1
t @ inpage.js:1
(anonymous) @ inpage.js:1
(anonymous) @ contentscript.js:1
(anonymous) @ contentscript.js:1
1.buffer @ contentscript.js:1
b @ contentscript.js:1
l @ contentscript.js:1
(anonymous) @ contentscript.js:1
inpage.js:1 MetaMask: 'ethereum.sendAsync(...)' is deprecated and may be removed in the future. Please use 'ethereum.send(method: string, params: Array)' instead. For more information, see: https://eips.ethereum.org/EIPS/eip-1193

Can you help me?

When try to unbox, can't find Python executable even it is already installed

Getting an error Can't find Python executable "C:\Program Files (x86)\Python36-32\python.exe". But the file is already exist at the mentioned path.

Command:
truffle unbox Quintor/angular-truffle-box

Output:

Downloading...
Unpacking...
Setting up...
Error: Command failed: npm install
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Program Files (x86)\Python36-32\python.exe", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\Dev\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Dev\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\Dev\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:112:15)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Dev\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\BlockChain\angular4\node_modules\scrypt
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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!     C:\Users\Dev\AppData\Roaming\npm-cache\_logs\2018-03-24T21_38_38_927Z-debug.log

    at ChildProcess.exithandler (child_process.js:211:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:885:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Versions:
npm version: 5.7.1
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32
Windows 10
Truffle v4.1.3 (core: 4.1.3)
Solidity v0.4.19 (solc-js)

truffle unbox Quintor/angular-truffle-box command problems

Hello, I've some problems trying to create a new project with angular-truffle-box.
When I run the command:
truffle unbox Quintor/angular-truffle-box

I get the following error:

`PS C:\Users\paulo.colombo\Documents\u-port-another-project> truffle unbox Quintor/angular-truffle-box

√ Preparing to download
√ Downloading
√ Cleaning up temporary files
× Setting up box
Error: Error: Error: Command failed: npm install
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\paulo.colombo\Documents\u-port-another-project\node_modules\keccak
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] rebuild: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\paulo.colombo\AppData\Roaming\npm-cache_logs\2019-05-28T12_13_02_105Z-debug.log
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\paulo.colombo\Documents\u-port-another-project\node_modules\scrypt
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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! C:\Users\paulo.colombo\AppData\Roaming\npm-cache_logs\2019-05-28T12_13_06_257Z-debug.log

at Object.unbox (C:\Users\paulo.colombo\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-box\box.js:69:1)
at process._tickCallback (internal/process/next_tick.js:68:7)

Truffle v5.0.19 (core: 5.0.19)
Node v10.15.3`

I'm using Windows 10, Node.js v10.15.3, npm v6.4.1 and Truffle v5.0.19

I've tried to install the latest node-gyp version globally using npm but I still get this error.

Refresh balances on transaction

Currently the balance is not refreshed after a transaction. This could (should?) be done by listening to Transfer events.

Error: Contract has not been deployed to detected network (network/artifact mismatch)

I am facing the issue while using the latest version of this truffle box.

However, it is not preset if I run ng serve -prod.

node -v

v8.11.1

truffle version

Truffle v4.1.5 (core: 4.1.5)
Solidity v0.4.21 (solc-js)

npm version

{ 'angular-truffle-box': '0.0.0',
npm: '5.8.0',
ares: '1.10.1-DEV',
cldr: '32.0',
http_parser: '2.8.0',
icu: '60.1',
modules: '57',
nghttp2: '1.25.0',
node: '8.11.1',
openssl: '1.0.2o',
tz: '2017c',
unicode: '10.0',
uv: '1.19.1',
v8: '6.2.414.50',
zlib: '1.2.11' }

ng version

Angular CLI: 1.7.3
Node: 8.11.1
OS: linux x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

@'angular/cli: 1.7.3
@'angular/language-service: 4.4.6
@'angular-devkit/build-optimizer: 0.3.2
@'angular-devkit/core: 0.4.8
@'angular-devkit/schematics: 0.3.2
@'ngtools/json-schema: 1.2.0
@'ngtools/webpack: 1.10.2
@'schematics/angular: 0.3.2
@'schematics/package-update: 0.3.2
typescript: 2.4.2
webpack: 3.11.0

JavaScript libraries' versions as mentioned at current package.json:

"@angular/animations": "^5.2.9",
"@angular/common": "^5.2.9",
"@angular/compiler": "^5.2.9",
"@angular/core": "^5.2.9",
"@angular/forms": "^5.2.9",
"@angular/http": "^5.2.9",
"@angular/platform-browser": "^5.2.9",
"@angular/platform-browser-dynamic": "^5.2.9",
"@angular/platform-server": "^5.2.9",
"@angular/router": "^5.2.9",
"core-js": "^2.5.4",
"rxjs": "^5.5.8",
"web3": "^1.0.0-beta.34",
"zone.js": "^0.8.23"

Upgrade to angular 6.0

Since it's available: Release Notes

Wins for us would be the webpack upgrade maybe solving some of the import issues and the versions for the cli being matched to the angular versions

No exported member 'default'

When I try to run ng serve, I get the following errors:

ERROR in /Users/sarbogast/dev/DVoxApp/src/app/util/web3.service.ts (2,9): Module '"/Users/sarbogast/dev/DVoxApp/node_modules/web3/index"' has no exported member 'default'.
ERROR in /Users/sarbogast/dev/DVoxApp/src/app/util/web3.service.ts (2,31): Module '"/Users/sarbogast/dev/DVoxApp/node_modules/web3/index"' resolves to a non-module entity and cannot be imported using this construct.

I'm using the following versions:

  • truffle 3.4.11
  • solidity 0.4.15
  • angular/cli: 1.4.9
  • typescript: 2.5.3

Revisit web3 integration

Currently, the web3 integration is currently functional, but kind of hacky. This is a reminder to revisit this integration and see if we can make it work with proper imports (instead of hacks with require)

Having trouble unboxing this box

When I try to unbox this I receive this error log:
1 error generated.
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/Cellar/node/10.4.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/BreckStodghill/workspace/truffleAngular/node_modules/sha3
gyp ERR! node -v v10.4.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Event example

Can we get an example of receiving an Event when updating the state of a contract?

For example the sendCoin() function in the MetaCoin.sol file emits a Transfer event when successfully evoked. How does one console.log this Event when sent back to the client?

Remove node-gyp subdependencies

Some people on windows tend to have issues installing node-gyp dependencies. Since this project just works in browser, the native extensions don't actually do anything for us.

It would be nice to see if we can work with upstream to replace node-gyp dependencies with either: pure js dependencies if performance is not an issue, or wasm dependencies if performance is an issue.

Code fails to run

Went over the steps.

At ng test or ng serve I get:

.../node_modules/@ngtools/json-schema/src/schema-tree.js:226
                this._children[name] = this._createChildProperty(name, value ? value[name] : undefined, forward ? forward.children[name] : null, propertySchema);
                                                                                                                                  ^

TypeError: Cannot read property 'glob' of null
    at ObjectSchemaTreeNode._set (.../node_modules/@ngtools/json-schema/src/schema-tree.js:226:131)
    at new ObjectSchemaTreeNode (.../node_modules/@ngtools/json-schema/src/schema-tree.js:211:14)
    at OneOfSchemaTreeNode._createChildProperty (.../node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
    at OneOfSchemaTreeNode._typesPrototype.schema.oneOf.map (.../node_modules/@ngtools/json-schema/src/schema-tree.js:163:25)
    at Array.map (native)
    at OneOfSchemaTreeNode (.../node_modules/@ngtools/json-schema/src/schema-tree.js:162:48)
    at ArraySchemaTreeNode._createChildProperty (.../node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
    at ArraySchemaTreeNode._set (.../node_modules/@ngtools/json-schema/src/schema-tree.js:288:39)
    at new ArraySchemaTreeNode (.../node_modules/@ngtools/json-schema/src/schema-tree.js:269:14)
    at ObjectSchemaTreeNode._createChildProperty (.../node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)

Any ideas?

Trouble unboxing package

Hi, I'm getting the following log while unboxing:

gustavoparedes1978@gustavoparedes1978-HP-Pavilion-g4-Notebook-PC:~$ sudo npm install -g @angular/cli
[sudo] password for gustavoparedes1978:
/usr/bin/ng -> /usr/lib/node_modules/@angular/cli/bin/ng

[email protected] install /usr/lib/node_modules/@angular/cli/node_modules/node-sass
node scripts/install.js

Unable to save binary /usr/lib/node_modules/@angular/cli/node_modules/node-sass/vendor/linux-x64-59 : { Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@angular/cli/node_modules/node-sass/vendor'
at Object.fs.mkdirSync (fs.js:905:18)
at sync (/usr/lib/node_modules/@angular/cli/node_modules/mkdirp/index.js:71:13)
at Function.sync (/usr/lib/node_modules/@angular/cli/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/usr/lib/node_modules/@angular/cli/node_modules/node-sass/scripts/install.js:111:11)
at Object. (/usr/lib/node_modules/@angular/cli/node_modules/node-sass/scripts/install.js:154:1)
at Module._compile (module.js:641:30)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/lib/node_modules/@angular/cli/node_modules/node-sass/vendor' }

[email protected] postinstall /usr/lib/node_modules/@angular/cli/node_modules/node-sass
node scripts/build.js

Building: /usr/bin/node /usr/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/node',
gyp verb cli '/usr/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /usr/bin/python2
gyp verb check python version /usr/bin/python2 -c "import platform; print(platform.python_version());" returned: "2.7.12\n"
gyp verb get node dir no --target version specified, falling back to host node version: 9.2.0
gyp verb command install [ '9.2.0' ]
gyp verb install input version string "9.2.0"
gyp verb install installing version: 9.2.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 9.2.0
gyp verb build dir attempting to create "build" dir: /usr/lib/node_modules/@angular/cli/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@angular/cli/node_modules/node-sass/build'
gyp ERR! System Linux 4.10.0-38-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /usr/lib/node_modules/@angular/cli/node_modules/node-sass
gyp ERR! node -v v9.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@angular/cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@angular/cli/node_modules/node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] postinstall: node scripts/build.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

TypeChain

How can we use TypeChain in angular 2+?

Unbox failing on windows 10

Hello Team,

I tried unboxing as well as directly downloading the content and then installing using npm install.

npm install is failing.

image

Following is the log for the same:

2733 verbose stack Error: [email protected] install: node-gyp rebuild
2733 verbose stack Exit status 1
2733 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
2733 verbose stack at EventEmitter.emit (events.js:314:20)
2733 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
2733 verbose stack at ChildProcess.emit (events.js:314:20)
2733 verbose stack at maybeClose (internal/child_process.js:1047:16)
2733 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
2734 verbose pkgid [email protected]
2735 verbose cwd E:\git-not\truffle-angular-box
2736 verbose Windows_NT 10.0.18363
2737 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
2738 verbose node v14.13.0
2739 verbose npm v6.14.8
2740 error code ELIFECYCLE
2741 error errno 1
2742 error [email protected] install: node-gyp rebuild
2742 error Exit status 1
2743 error Failed at the [email protected] install script.
2743 error This is probably not a problem with npm. There is likely additional logging output above.
2744 verbose exit [ 1, true ]

System Information:
Windows 10
[email protected]

Update to Angular 4 and angular-cli 1.5

Currently angular-cli is pinned to 1.4.9. It will fallback to the locally installed version, which 1.5.0 will not do. Using 1.5.0 gives some issues, which I'm guessing will be resolved by bumping angular to v5.

Error

it is not work "const deployedMetaCoin = await this.MetaCoin.deployed();"

Error: Contract has not been deployed to detected network (network/artifact mismatch)
at eval (contract.js:435)
at ZoneDelegate.invoke (zone.js:388)
at Zone.run (zone.js:138)
at eval (zone.js:858)
at ZoneDelegate.invokeTask (zone.js:421)
at Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
at ZoneTask.invokeTask (zone.js:500)
at ZoneTask.invoke (zone.js:485)
at timer (zone.js:2025)

Expand e2e tests

The end-to-end tests currently just check if the page manages to load.

In order to do this, a testrpc needs to be spun up and the seed needs to be constant, or the addresses should be injected into the test.

accounts balance happend but dont refresh on ganache or metamask

Hello i have unboxing Quintor on this enviroment:

Windows 10
Truffle v5.0.0 (core: 5.0.0)
Solidity v0.5.0 (solc-js)
Node v10.14.2
Angular : (7.1.0)
Visual Code Studio like IDE
Ganache
I have unboxing, compile and migration well.
I can see the web app but the first thing that I see extrange is in real balance in ganache or metamask first acount have 9999.98 ETH and in web i see You have 10000 META

The address of the first account is the same that I have in ganache or metamask 0xF6E59Ed94346E1e2e7e232A92b640761e4851E83. If i selected other account in metamask this address change. So I try to send 100 to my second address ( I have 5) 0xA49E8fDD3033Ed17cf732dbB94B0E15eC9d3339A and when I send MetaCoin appears this:
image
But the receiver address is always this: 0xBF5FaBf41260908c7A5505D0204a79da3a36DF77
I push on Confirm say transaction done , on app i see 9990 but on ganache or metamask nothing have been changed.

Create Dockerfile

Due to external dependencies and the need for particular versions in some environments it would be helpful to create a development docker.

This Dockerfile would allow volume mounting the source code and developing in a fixed environment.

Setup CI

Needs to run:

  • ng test
  • ng e2e (needs phantom-js)
  • truffle test
  • ng lint
  • A solidity linter?

I have good experiences with Travis in open source context, so I'm tempted to use that. Feedback welcome.

web3_1.default is not a constructor

Hi,
I received the error message: "web3_1.default is not a constructor"
The project dependencies are:
angular 5,
"web3": "^1.0.0-beta.26",
"@angular/cli": "^1.6.7"

I didn't modified the web3.service.ts as its original, however, the app detected metamask is installed and throw the error when reach below line in the bootstrapWeb3()
this.web3 = new Web3(window.web3.currentProvider);

Please help!!!

Expand angular tests

The tests run by ng test are marginal. These should probably be expanded. I have tried to work on this, but I was running into some issues with the styles of import we're using for the truffle-contract.

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.