I literally cannot understand what the error says and what the solution is!
C:\Users\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\keccak>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Kunal Dhariwal\AppData\Local\Programs\Python\Python36\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
gyp ERR! System Windows_NT 10.0.17134
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\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\keccak
gyp ERR! node -v v11.2.0
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 ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Kunal Dhariwal\AppData\Roaming\npm-cache_logs\2018-11-19T09_49_59_863Z-debug.log
"Keccak bindings compilation fail. Pure JS implementation will be used."
[email protected] install C:\Users\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\scrypt
node-gyp rebuild
C:\Users\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Kunal Dhariwal\AppData\Local\Programs\Python\Python36\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
gyp ERR! System Windows_NT 10.0.17134
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\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\scrypt
gyp ERR! node -v v11.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
[email protected] install C:\Users\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\secp256k1
npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."
[email protected] rebuild C:\Users\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\secp256k1
node-gyp rebuild
C:\Users\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\secp256k1>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Kunal Dhariwal\AppData\Local\Programs\Python\Python36\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
gyp ERR! System Windows_NT 10.0.17134
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\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\secp256k1
gyp ERR! node -v v11.2.0
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 ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Kunal Dhariwal\AppData\Roaming\npm-cache_logs\2018-11-19T09_50_03_435Z-debug.log
"Secp256k1 bindings compilation fail. Pure JS implementation will be used."
[email protected] install C:\Users\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\sha3
node-gyp rebuild
C:\Users\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\sha3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Kunal Dhariwal\AppData\Local\Programs\Python\Python36\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
gyp ERR! System Windows_NT 10.0.17134
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\Kunal Dhariwal\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\sha3
gyp ERR! node -v v11.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\ganache-cli\node_modules\ganache-core\node_modules\scrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
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\Kunal Dhariwal\AppData\Roaming\npm-cache_logs\2018-11-19T09_50_56_381Z-debug.log
Try npm install -g --production windows-build-tools, which should install the required dependencies. You might also need to install Python (if it doesn't download the package for you).
Had the same error earlier when installing Ganache CLI v6.2.1 on my Windows 10 machine.
@Enigmatic331 why does it need to install python though?
@Enigmatic331 Thanks man! It's working fine and up running 馃挴
@kunaldhariwal Thanks for reporting this. I'm reopening because it was not my intent to require users to install windows-build-tools in order to use ganache-cli! I intended our native modules to be _optional_ dependencies, with fallbacks to pure-js versions, but that seems to not be what is happening here.
In my Ubuntu I'm having the same error please help
@chriszer, what does running python --version output for you?
I tried to install on Windows, Mac and Ubuntu. I'm getting the same error on all the platforms.
It would be great if it can be helped. and please Mac and Linux tags too for this issue as this is happening for all the platforms. Thanks!
@AshutoshMahala, when you run python --version what is returned?
@davidmurdoch python 2.7
@AshutoshMahala It is python 2.7 on Mac, Ubuntu, and Windows? Is the error you are receiving on these platforms something like gyp ERR! command "...node.exe" "...node-gyp.js" "rebuild" or something else?
@davidmurdoch
After successfully installing windows build tools and python v2.7.15,
on running 'npm install --save mocha ganache-cli [email protected]'
or 'npm install -g ganache-cli'
The below error comes:
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated [email protected]: 鈿狅笍 WARNING 鈿狅笍 tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
> [email protected] preinstall C:\Users\rahul\OneDrive\Inbox\node_modules\scrypt
> node node-scrypt-preinstall.js
> [email protected] preinstall C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\scrypt
> node node-scrypt-preinstall.js
> [email protected] install C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."
> [email protected] rebuild C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\keccak
> node-gyp rebuild
C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\keccak>if not defined npm_config_node_gyp (node "C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\rahul\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\keccak
gyp ERR! node -v v10.14.1
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\rahul\AppData\Roaming\npm-cache\_logs\2018-12-04T10_58_28_686Z-debug.log
"Keccak bindings compilation fail. Pure JS implementation will be used."
> [email protected] install C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\scrypt
> node-gyp rebuild
C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\rahul\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\scrypt
gyp ERR! node -v v10.14.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
> [email protected] install C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\secp256k1
> npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."
> [email protected] rebuild C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\secp256k1
> node-gyp rebuild
C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\secp256k1>if not defined npm_config_node_gyp (node "C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\rahul\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\secp256k1
gyp ERR! node -v v10.14.1
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\rahul\AppData\Roaming\npm-cache\_logs\2018-12-04T10_58_31_576Z-debug.log
"Secp256k1 bindings compilation fail. Pure JS implementation will be used."
> [email protected] install C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\sha3
> node-gyp rebuild
C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\sha3>if not defined npm_config_node_gyp (node "C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Users\rahul\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\rahul\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\rahul\OneDrive\Inbox\node_modules\ganache-cli\node_modules\ganache-core\node_modules\sha3
gyp ERR! node -v v10.14.1
gyp ERR! node-gyp -v v3.8.0
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\ganache-cli\node_modules\ganache-core\node_modules\scrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
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\rahul\AppData\Roaming\npm-cache\_logs\2018-12-04T10_58_36_447Z-debug.log
In need of help!!
I'm now able to install it with --unsafe-perm.
Thsnk for help
I solved a similar problem today, installing ganache-cli and drizzle, where msbuild was failing with MSB5014 'file format not recognized'. The problem was I had an older version of msbuild on my PATH that prevented visual studio 2017 from using its build tools. Once I had removed all references to C:\Windows\Microsoft.Net\Framework64\* from my PATH, where msbuild.exe is located, everything built correctly.
Note I found this solution after a lot of tweaking and messing with things. I had problems downloading windows-build-tools which were solved by uninstalling python (using add remove programs). I also made sure C++ tools were enabled in the visual studio installer, and added support for visual studio 2015 tools in the 2017 installer as well as support for python build tools. I cannot say if these steps made a difference or not.
I am getting the same error on Mac while installing ganache-cli, Python=3.7.0. How do I solve this?
@coderark, Python 2.7 is required to build the native modules required by some of ganache's transitive dependencies.
Alternatively, you can use the new ganache-cli@beta which removes all native modules from the build. To install run npm install ganache-cli@beta -g.
@davidmurdoch Thanks it worked 馃挴
Fixed in [email protected]
I know this is a ganache-cli thread, but this is still happening when installing Truffle.
@raphadko are you installing Truffle from npm or from source?
farokh@farokh-Latitude-E6420:~$ ganache-cli SyntaxError: Unexpected identifier having this problem while runnnig ganache-cli on ubuntu 16.04, seems like something is missing, please help
/usr/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37
*/var n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,o,c=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.
@fcooper98 sorry you are having trouble. Can you open a new issue for this?
Having the same issue on mac. Python version:
Python 3.6.1 :: Anaconda 4.4.0 (x86_64)
Tried the beta (npm install ganache-cli@beta -g), tried git clone but to no avail: throwing a long list of errors.
Appreciate your help.
@varioso1 You'll need to make sure you are using python 2.7 on your system to build native modules. With that said, ganache-cli should still install and work even if the native modules fail to install.
Can you paste the errors here?
@davidmurdoch Thank you for your response. I started installing 2.7 but then restarted my system and was able (by the looks of it) to install ganache by running sudo npm install ganache-cli@beta -g. Then I got the following error at npm start though:
missing script: start
But that might be something on my side?
Otherwise, I am able to use ganache-cli without any problems. I wanted to use the GUI though (which is available only with python 2.7, right)?
Thank you!
@varioso1 it looks like you've installed ganache-cli@beta globally. To start ganache, you should be able to issue the command ganache-cli directly into your terminal! I generally recommend uninstalling any previous global installations you have whenever you try a different version too.
@nicholasjpaterno thank you. That's true, I've installed it a couple of times on top of previous installations (only deleting the ganache folder) which might cause some problems, I guess. Otherwise, I've been using ganache-clisuccessfully, deploying contracts. Haven't been able to open up the GUI though. Not sure if there is a way to open it without cloning the GitHub repo.
Any idea why I'm getting the missing script: start error? Maybe not an issue or not for this thread, though. Thank you.
@varioso1 Unfortunately, right now ganache is split among a few different repositories. The command you issued will only install ganache-cli globally. For the GUI you'll want to head over to https://github.com/trufflesuite/ganache/releases to download the latest pre-built executable of Ganache GUI for your OS!
@nicholasjpaterno Got, it, thank you. Just downloaded. Working fine. Cheers.
i have installed python 2.7.16 and while installing Ganache through this command
*npm install --save mocha ganache-cli [email protected]*
Getting this Error
C:\Users\Rajesh Prasad\Desktop\Inbox>npm install --save mocha ganache-cli [email protected]
npm ERR! Unexpected end of JSON input while parsing near '...,"rlp":"^2.0.0"},"_ha'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Rajesh Prasad\AppData\Roaming\npm-cache_logs\2019-09-09T07_37_05_758Z-debug.log
Please help !
@RajeshPrasad031 Can you try simply running npm install ganache-cli and let me know if you still get an error?
And if you do still get an error, can you paste the last 100 or so relevant lines of the npm log here?
p.s., you should upgrade to [email protected] if feasible.
@davidmurdoch thanks man. I installed it from it's official website "Trufflesuite"
Most helpful comment
@kunaldhariwal Thanks for reporting this. I'm reopening because it was not my intent to require users to install
windows-build-toolsin order to use ganache-cli! I intended our native modules to be _optional_ dependencies, with fallbacks to pure-js versions, but that seems to not be what is happening here.