truffle-box / pet-shop-box Goto Github PK
View Code? Open in Web Editor NEWA box containing all you need to get started with our Pet Shop tutorial.
License: MIT License
A box containing all you need to get started with our Pet Shop tutorial.
License: MIT License
Hi, I am following the pet shop tutorial as mentioned there. But when i am trying to run test then it shows me the following errors! And I can not run the test properly. Any suggestion??
c:/trufflePet/truffleDemo/test/TestAdoption.sol:3:1: ParserError: Source "truffle/Assert.sol" not found: File not supplied initially. import "truffle/Assert.sol"; ^--------------------------^
c:/trufflePet/truffleDemo/test/TestAdoption.sol:4:1: ParserError: Source "truffle/DeployedAddresses.sol" not found: File not supplied initially. import "truffle/DeployedAddresses.sol"; ^-------------------------------------^
D:\Dev\Ethereum\contest>truffle unbox pet-shop
√ Preparing to download box
× Downloading
Unbox failed!
× Downloading
Unbox failed!
RequestError: Error: getaddrinfo ENOENT raw.githubusercontent.com
at new RequestError (C:\Users\Younas\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-native\node_modules\request-promise-core\lib\errors.js:14:1)
at Request.plumbing.callback (C:\Users\Younas\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-native\node_modules\request-promise-core\lib\plumbing.js:87:1)
at Request.RP$callback [as _callback] (C:\Users\Younas\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request-promise-native\node_modules\request-promise-core\lib\plumbing.js:46:1)
at self.callback (C:\Users\Younas\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:185:1)
at Request.emit (events.js:315:20)
at Request.onRequestError (C:\Users\Younas\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\request\request.js:881:1)
at ClientRequest.emit (events.js:315:20)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Truffle v5.3.2 (core: 5.3.2)
Node v14.16.0
Any ideas?
truffle version
Truffle v5.0.0-beta.2 (core: 5.0.0-beta.2)
Solidity v0.5.0 (solc-js)
Node v10.13.0
truffle(develop)> test
Using network 'develop'.
Compiling ./test/TestAdoption.sol...
TestAdoption
1) "before all" hook: prepare suite
0 passing (2s)
1 failing
1) TestAdoption
"before all" hook: prepare suite:
Error: while migrating Assert: Returned error: VM Exception while processing transaction: out of gas
at /usr/lib/node_modules/truffle/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
at process._tickCallback (internal/process/next_tick.js:68:7)
1
truffle(develop)>
/usr/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/lib/utils.js:200
throw new Error(error);
^
Error: TestAdoption contains unresolved libraries. You must deploy and link the following libraries before you can deploy a new version of TestAdoption: Assert
at Function.checkLibraries (/usr/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/lib/utils.js:200:1)
at constructor.detectNetwork.then.network (/usr/lib/node_modules/truffle/build/webpack:/packages/truffle-contract/lib/contract.js:181:1)
at process._tickCallback (internal/process/next_tick.js:68:7)
When I am trying to Truffle unbox pet-shop run on my machine it is show that it doesn't exist
at URL https://github.com/truffle-box/pet-shop-box doesn't exist
# truffle unbox pet-shop
Downloading...
Error: Truffle Box at URL https://github.com/truffle-box/pet-shop-box doesn't exist. If you believe this is an error, please contact Truffle support.
at Request._callback (/usr/lib/node_modules/truffle/build/webpack:/packages/truffle-box/lib/utils/unbox.js:50:1)
at Request.self.callback (/usr/lib/node_modules/truffle/build/webpack:/~/request/request.js:185:1)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/usr/lib/node_modules/truffle/build/webpack:/~/request/request.js:1157:1)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/usr/lib/node_modules/truffle/build/webpack:/~/request/request.js:1079:1)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
While I was trying to unbox the truffle pet shop using "Truffle unbox pet-shop" it is continuously showing the error that it doesn't exist there to unbox
How can I fix that issue on the Ubuntu terminal?
Hi all!
Im running on:
Windows 10 Enterprise
Truffle v4.1.5 (core: 4.1.5)
Solidity v0.4.21 (solc-js)
I'm following the pet-shop example and everything goes well untill I run:
truffle.cmd test
Then I get:
Compiling .\contracts\Adoption.sol...
Compiling .\test\TestAdoption.sol...
Compiling truffle/Assert.sol...
Compiling truffle/DeployedAddresses.sol...
But then:
TestAdoption
1) "before all" hook: prepare suite
0 passing (3s)
1 failing
How could I fix this?
Thank you very much
Steps to reperform:
Click "Adopt Pet"
Click "Reject" when metamask prompt appears
Refresh Webpage
I am using Chrome, Metamask on MAC.
When Reject is pressed: Following console error appears:
Error: MetaMask Tx Signature: User denied transaction signature.
at TransactionStateManger. (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/background.js:2214:39)
Prior to the page being refreshed - you can click "Adopt Pet", confirm the transaction, and the pet should be successfully adopted.
After the app connects to Metamask all of the buttons turn to say "success" even though I haven't clicked on them.
Using Chrome, metamask, apple.
While trying to compile the TestAdoption.sol
part of the tutorial, I come across this issue.
the code is:
pragma solidity ^0.4.17;
import "truffle/Assert.sol";
import "truffle/DeployedAddress.sol";
import "../contracts/Adoption.sol";
contract TestAdoption{
Adoption adoption= Adoption(DeployedAddresses.Adoption());
}
sha1-ZApTfBgGiTA9W+krxHa568RBwLw= integrity checksum failed when using sha1: wanted sha1-ZApTfBgGiTA9W+krxHa568RBwLw= but got sha1-xsXUqHv6v6lH+0bIRHmjaGeQTEg=. (48730 bytes)
OS: ubuntu-16.04
Truffle v4.0.3 (core: 4.0.3)
Solidity v0.4.18 (solc-js)
I am following the tutorial here: http://truffleframework.com/tutorials/pet-shop.
At first,
when I tried truffle develop, that connects to localhost:9545.
Followed the tutorial, though I tried connecting metamask http://localhost:9545, and http://127.0.0.1:9545, that wasn't able to connect "Connecting to Unknown Private Network".
Second,
I tried changing the configuration file, "truffle.js"
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// for more about customizing your Truffle configuration!
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*" // Match any network id
}
}
};
As a result, I can connect metamask's private network "http://127.0.0.1:7545"
However, as I did truffle develop, that network is "localhost:9545" though I changed truffle.js.
And then, I did truffle compile and migrate, there happened the error "Could not connect to your Ethereum client. Please check that your Ethereum client:
- is running - is accepting RPC connections (i.e., "--rpc" option is used in geth) - is accessible over the network - is properly configured in your Truffle configuration file (truffle.js)
Any idea what the problem is, or how I debug?
: truffle test
Using network 'development'.
Compiling ./contracts/Adoption.sol...
Compiling ./test/TestAdoption.sol...
TestAdoption
1) "before all" hook: prepare suite
0 passing (20s)
1 failing
1) TestAdoption
"before all" hook: prepare suite:
Error: while migrating TestAdoption: Returned error: VM Exception while processing transaction: revert
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-deployer/src/deployment.js:364:1
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
This is the Ganache log, it says "revert" but no reason why:
[17:24:46] Transaction: 0xd4f8e47ef6f02036d3880512ffe64545ce08b5e85cc28f2408242efaee272add
[17:24:46] Contract created: 0x4e96714cc6c51e9b673ec09701e12ac3e27fb9b2
[17:24:46] Gas usage: 190068
[17:24:46] Block Number: 16
[17:24:46] Block Time: Wed Jan 30 2019 17:24:44 GMT+0000 (GMT)
[17:24:46] eth_getTransactionReceipt
[17:24:46] eth_getCode
[17:24:46] eth_getBlockByNumber
[17:24:46] eth_getBlockByNumber
[17:24:46] eth_getBlockByNumber
[17:24:46] eth_estimateGas
[17:24:46] eth_getBlockByNumber
[17:24:46] eth_blockNumber
[17:24:46] eth_sendTransaction
[17:24:46] Transaction: 0x2995d64ec8cff5018e91e99cf9fb850a4fb3153575e539de2b31998835907c1c
[17:24:46] Contract created: 0xc43cc30198cf91e1f791bb1d29582e12ada1ceb7
[17:24:46] Gas usage: 189480
[17:24:46] Block Number: 17
[17:24:46] Block Time: Wed Jan 30 2019 17:24:45 GMT+0000 (GMT)
[17:24:46] Runtime Error: revert
[17:24:46] eth_call
[17:24:46] eth_getBlockByNumber
When you click on submit, the button label won't turn to "success" unless you refresh the page.
This happens when running locally using truffle develop
or Ganache.
This does however work when deployed to a testnet like Ropsten
could I get the complete dapp?
Ubuntu 18.04.
Truffle v5.1.2 (core: 5.1.2)
Solidity v0.5.12 (solc-js)
Node v13.2.0
Web3.js v1.2.2
When I execute truffle unbox pet-shop
on terminal, I get error
✔ Preparing to download
⠼ DownloadingError: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:201:27)
I am expecting contents of directory to look like this (from https://www.dappuniversity.com/articles/the-ultimate-ethereum-dapp-tutorial)
But instead it looks like this
I followed this wonderful tutorial step-by-step, and encountered this error in the testing part: https://www.trufflesuite.com/tutorials/pet-shop#testing-the-smart-contract-using-solidity
Truffle v5.1.46 (core: 5.1.46)
Solidity v0.5.16 (solc-js)
Node v12.18.4
Web3.js v1.2.1
I am getting
Insufficient balance for transaction
from Metamask.
I am following http://truffleframework.com/tutorials/pet-shop.
Thanks,
Basil
Not sure what the issue is....
truffle compile
Compiling ./contracts/Adoption.sol...
Compiling ./contracts/Migrations.sol...
Compilation warnings encountered:
/home/ubuntu/eth_projects/PetShop/contracts/Migrations.sol:11:3: Warning: No visibility specified. Defaulting to "public".
function Migrations() {
^
Spanning multiple lines.
,/home/ubuntu/eth_projects/PetShop/contracts/Migrations.sol:15:3: Warning: No visibility specified. Defaulting to "public".
function setCompleted(uint completed) restricted {
^
Spanning multiple lines.
,/home/ubuntu/eth_projects/PetShop/contracts/Migrations.sol:19:3: Warning: No visibility specified. Defaulting to "public".
function upgrade(address new_address) restricted {
^
Spanning multiple lines.
/home/ubuntu/eth_projects/PetShop/contracts/Migrations.sol:11:3: Warning: No visibility specified. Defaulting to "public".
function Migrations() {
^
Spanning multiple lines.
,/home/ubuntu/eth_projects/PetShop/contracts/Migrations.sol:15:3: Warning: No visibility specified. Defaulting to "public".
function setCompleted(uint completed) restricted {
^
Spanning multiple lines.
,/home/ubuntu/eth_projects/PetShop/contracts/Migrations.sol:19:3: Warning: No visibility specified. Defaulting to "public".
function upgrade(address new_address) restricted {
^
Spanning multiple lines.
,/home/ubuntu/eth_projects/PetShop/contracts/Adoption.sol:8:11: DeclarationError: Undeclared identifier.
require(petID >= 0 && petID <=15) ;
^---^
Here is my system: Ubuntu 16.04
sudo npm -v
5.6.0
sudo nodejs -v
v9.3.0
echo $PATH
/home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ubuntu/eth_projects/PetShop
pwd
/home/ubuntu/eth_projects/PetShop/
more /contracts/Adoption.sol
pragma solidity ^0.4.17;
contract Adoption {
address[16] public adopters;
// Adopting a pet
function adopt(uint petId) public returns (uint) {
require(petID >= 0 && petID <=15) ;
adopters[petID] = msg.sender;
return petId;
}
// Retrieving the adopters
function getAdopters() public view returns (address[16]) {
return adopters;
}
}
Thanks for your job. It helps a lot to understand the operation of truffle.
In my case I am tested in a private network of quorum. I would like to know how instead of "adopt" I can pay?
For example, I want buy Frieda to cost 3 ethers, and when I adopt it, I can take it from my account to enter it into the seller's account.
Is there an example payable of this style?
Thank you
Learning truffle test in JS, Doing the pet-shop tutorial on the truffle website.
Everything was ok (ganache running, compilation contract success, migration down), but when i run "truffle test" command, my terminal showing strange caracters in loop. Can't find solution on internet...
I reproduce on windows and mac. I tried to use different version of nodeJs/truffle but not solve it.
Run truffle test command
The command should show the unit tests result.
I redirect the output of the truffle test command to see whats happened, and this is the result :
The command didn't finish itself, i need to stop it. I have a log about 1,5Go for a run about 30s.
truffle version
): Tested with 5.4.25 and 5.4.27node --version
): Tested with 12.8.22 and 14.18.1npm --version
): 8.3.0I opened an issue on pet-shop boxe repository too...
Thanks in advance for hep !
i meet error how to use tutorialtoken token in pst-shop
i try but error
pragma solidity ^0.4.17;
contract TTtoken {
function balanceOf(address addr) public returns (uint256);
}
contract Adoption {
address[16] public adopters;
TTtoken mainDAO = TTtoken(0x2c2b9c9a4a25e24b174f26114e8926a9f2128fe4);
// Adopting a pet
function adopt(uint petId) public returns (uint) {
require(petId >= 0 && petId <= 15);
adopters[petId] = msg.sender;
return petId;
}
// Retrieving the adopters
function getAdopters() public view returns (address[16]) {
return adopters;
}
// Retrieving the adopters
function getMytokenbalanceOf(address _owner) public view returns (uint256) {
uint256 balance = mainDAO.balanceOf(_owner);
return balance;
}
}
So I have been trying to get the app to work for a while now, but keep running into an issue when I push the adopt button. The logs show that the contract file adoption.json is not found. The error messages from browser console are below. I solved the errors by moving my contracts folder from build/contracts directly to src and then specified the path to the adoption.json file. Any idea why this is happening? I guess that even though the fix works, this really is not the way it's supposed to work, as the example file did not need to specify any location specifications. I'm working with rinkeby, and metamask connects properly and everything seems to work as it should.
Any advice is appreciated! Thanks in advance.
I'm following all the steps in the tutorial, but when I'm compiling and migrating the contract nothing happens - no errors, no status messages.
Last year I did this tutorial and all was fine. Could you please recheck all files.
Maybe it is anyhow connected with the latest updates and solidity 0.5.0.
Metamask have implemented a change which no longer exposes account by default - which mean whilst the tutorial still works - the interaction with metamask no longer occurs -
I began playing with this early this year and was good introduction on how the various pieces hang together. I am using it again as part of a demo for college but need some help
Details of the reason they have stopped metamask interacting by default are here:
https://medium.com/metamask/https-medium-com-metamask-breaking-change-injecting-web3-7722797916a8
It mention that the following code should be added but I am not sure where - should it be in the app.js file?
The following code shows a new way to start up a dapp that can be used today in both legacy and modern dapp browsers:
window.addEventListener('load', async () => {
// Modern dapp browsers...
if (window.ethereum) {
window.web3 = new Web3(ethereum);
try {
// Request account access if needed
await ethereum.enable();
// Acccounts now exposed
web3.eth.sendTransaction({/* ... */});
} catch (error) {
// User denied account access...
}
}
// Legacy dapp browsers...
else if (window.web3) {
window.web3 = new Web3(web3.currentProvider);
// Acccounts always exposed
web3.eth.sendTransaction({/* ... */});
}
// Non-dapp browsers...
else {
console.log('Non-Ethereum browser detected. You should consider trying MetaMask!');
}
});
update index.html and CSS to get the latest look and feel and update the app.js jquery to modern JS.
Add to the tutorial how to create payable functions, so that a non-owner account can 'pay' for the dog adoption to the contract owner. Have the function and MetaMask use another ganache account to pay the contract in ethereum, then have the payable function transfer the ETH to the owner.
Currently having a ton of trouble making that^ work in the contract and it's pretty mandatory 101 knowledge for contract programming. It would be super useful if somebody who knew what they were doing could implement this in the tutorial
I was following the truffle pet-shop tutorial and added new network but the balance is zero. What's wrong with my ganache? Or is the reason something else? Thanks!
I forgot to run truffle migrate
. How would one alert the user that the contract can't be contacted in this case?
I am following the tutorial here: http://truffleframework.com/tutorials/pet-shop
At first, every step is successful, but when I finally test the pet shop in chrome, there is no response when I click the "adopt" button.
Truffle v4.0.3 (core: 4.0.3)
Solidity v0.4.18 (solc-js)
Chrome Version 62.0.3202.94 (Official Build) (64-bit)
MetaMask 3.13.2
Ganache 1.0.1
mac os 10.12.6
Today, I do a test about how to create dapp named pet-shop-box follow the offcial tutorial . I am following the tutorial is here:http://truffleframework.com/tutorials/pet-shop.The issue is occuring after I operate until the commend npm run dev
,html is occur,but when I click the "adopt" button ,the terminal and web happen nothing,and when I run npm run dev
,the terminal is show the 304.
OS: ubuntu-14.04
Truffle v4.0.3 (core: 4.0.3)
Solidity v0.4.18 (solc-js)
The First step:
the code of truffle.js as fellow:
module.exports = { // See <http://truffleframework.com/docs/advanced/configuration> // for more about customizing your Truffle configuration! networks: { development: { host: "localhost:", port: 8545, network_id: "*" // Match any network id } } };
the commend to launch ganache-cli as fellow:testrpc
the current RPC of MetaMask as fellow:http://localhost:8545
The Second step:
the code of truffle.js as fellow:
module.exports = { // See <http://truffleframework.com/docs/advanced/configuration> // for more about customizing your Truffle configuration! networks: { development: { host: "localhost:", port: 9545, network_id: "*" // Match any network id } } };
the commend to launch ganache-cli as fellow:truffle develop
the current RPC of MetaMask as fellow:http://localhost:9545
I have try the another port such 7545 and the host linke'172.0.0.1:port',but the issue still take place.And the develop tool of chorme is normal and no issue is remindered. But I type to console.log()
in the app.js and observe the initcontract()
is not work .So I don't know where the I should modify for this project?
The picture of terminal is here:
The picture of web is here:
Hi I am trying to follow pet-shop tutorial but I got error Contract has not been deployed to detected network (network/artifact mismatch)
_
OS: MacOS 10.13.1
Truffle v4.0.3 - a development framework for Ethereum
yarn --version 1.3.2
--
I also try to config in truffle.js
but no luck
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*" // Match any network id
}
}
};
When i m trying to run the dapp,an error is being thrown.
I'm new to this solidity stuff,and trying to learn through this pet-shop-box.
Can anyone help me?
Here is the error-:
Browsersync] Serving files from: ./src
[Browsersync] Serving files from: ./build/contracts
[Browsersync] Watching files...
events.js:182
throw er; // Unhandled 'error' event
^
Error: watch /home/hrishabh/crypto-pet/migrations/1_initial_migration.js ENOSPC
at _errnoException (util.js:1026:11)
at FSWatcher.start (fs.js:1383:19)
at Object.fs.watch (fs.js:1409:11)
at createFsWatchInstance (/home/hrishabh/crypto-pet/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/hrishabh/crypto-pet/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/hrishabh/crypto-pet/node_modules/chokidar/lib/nodefs-handler.js:232:14)
at FSWatcher.NodeFsHandler._handleFile (/home/hrishabh/crypto-pet/node_modules/chokidar/lib/nodefs-handler.js:259:21)
at FSWatcher. (/home/hrishabh/crypto-pet/node_modules/chokidar/lib/nodefs-handler.js:480:21)
at FSReqWrap.oncomplete (fs.js:154:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: lite-server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev 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! /home/hrishabh/.npm/_logs/2018-12-27T17_56_55_600Z-debug.log
hrishabh@hrishabh-HP-Pavilion-15-Notebook-PC:~/crypto-pet$ npm run serve
npm ERR! missing script: serve
npm ERR! A complete log of this run can be found in:
npm ERR! /home/hrishabh/.npm/_logs/2018-12-27T17_57_30_778Z-debug.log
Once I connect the pet shop to my wallet, every Adopt button turns into Success without me doing anything. Can @adrianmcli or anyone fix this? My repo is below: https://github.com/dennymrh/pet-shop-tutorial
I'm getting the following errors from truffle unbox pet-shop
:
Downloading...
Unpacking...
Setting up...
Error: Command failed: npm install
npm WARN deprecated [email protected]: express 2.x series is deprecated
npm WARN deprecated [email protected]: connect 1.x series is deprecated
npm WARN ETXTBSY: text file is busy, rmdir '/host/pet-shop-tutorial/node_modules/fsevents/build/Release/.deps/Users/eshanker/Code/fsevents'
npm ERR! path ../dev-ip/lib/dev-ip.js
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../dev-ip/lib/dev-ip.js' -> '/host/pet-shop-tutorial/node_modules/.bin/dev-ip'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2017-12-05T13_29_49_590Z-debug.log
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
I'm running in an ubuntu xenial virtual machine (vagrant file here).
At present the number of dogs displayed is fixed i.e 11 dogs. What if we want to increase or decrease this number?
How can we add/delete number of dogs without hard coding done in json file ?
$ truffle unbox pet-shop
Starting unbox...
=================
✔ Preparing to download box
✔ Downloading
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/x/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/Users/x/.nvm/versions/node/v12.18.3/bin/node" "/Users/x/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/x/project/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/x/project/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64" "--napi_version=6" "--node_abi_napi=napi"
gyp ERR! cwd /Users/x/project/node_modules/fsevents
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/x/.nvm/versions/node/v12.18.3/bin/node /Users/x/.nvm/versions/node/v12.18.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/x/project/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/x/project/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=6 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/x/project/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 19.6.0
node-pre-gyp ERR! command "/Users/x/.nvm/versions/node/v12.18.3/bin/node" "/Users/x/project/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/x/project/node_modules/fsevents
node-pre-gyp ERR! node -v v12.18.3
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
✔ Cleaning up temporary files
✔ Setting up box
Unbox successful, sweet!
Commands:
Compile: truffle compile
Migrate: truffle migrate
Test contracts: truffle test
Run dev server: npm run dev
I have trouble to follow the tutorial http://truffleframework.com/tutorials/pet-shop. Could you provide the final repo and all the commands in a script so that I can run directly?
A user reported that the current web3 version (0.19.x) is incompatible with the latest build of MetaMask. Upgrading to 0.20.6 fixed the problem.
(Metamask was showing 2 tx confirmation windows instead of 1)
I have truffle 3.2.4 and not managing to update to newer version
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.