remix-ide installation document: https://github.com/ethereum/remix-ide
Native environment:
> lsb_release -a
LSB Version::core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.4.1708(Core)
Release:7.4.1708
Codename: Core
> node --version
v8.9.3> npm --version
6.1.0
installation
> npm install remix-ide -g
start up
> remix-ide
Then an error..., the error message is as follows:
Error: Cannot find module './build/Release/scrypt'
at Function.Module._resolveFilename(module.js:536:15)
at Function.Module._load(module.js:466:25)
at Module.require(module.js:579:17)
at require(internal/module.js:11:18)
at Object.<anonymous>(/services/apps/node-v8.9.3-linux-x64/lib/node_modules/remix-ide/node_modules/scrypt/index.js:3:20)
at Module._compile(module.js:635:30)
at Object.Module._extensions..js(module.js:646:10)
at Module.load(module.js:554:32)
at tryModuleLoad(module.js:497:12)
at Function.Module._load(module.js:489:3)
at Module.require(module.js:579:17)
at require(internal/module.js:11:18)
at Object.<anonymous>(/services/apps/node-v8.9.3-linux-x64/lib/node_modules/remix-ide/node_modules/scrypt.js/node.js:1:76)
at Module._compile(module.js:635:30)
at Object.Module._extensions..js(module.js:646:10)
at Module.load(module.js:554:32)
at tryModuleLoad(module.js:497:12)
at Function.Module._load(module.js:489:3)
at Module.require(module.js:579:17)
at require(internal/module.js:11:18)
at Object.<anonymous>(/services/apps/node-v8.9.3-linux-x64/lib/node_modules/remix-ide/node_modules/web3-eth-accounts/src/index.js:35:16)
at Module._compile(module.js:635:30)
Look at the exception information, it should be the lack of scrypt package, check the system node_modules directory
ll /services/apps/node-v8.9.3-linux-x64/lib/node_modules/
There is indeed no scrypt
Then install scrpt
scrpt document https://www.npmjs.com/package/scrypt
Specific implementation steps:
> npm install -g node-gyp
> npm install -g scrypt
When installing node-gyp, another error was reported: WARN EACCES user “root” does not have permission to access the dev dir
Solution: https://github.com/nodejs/node-gyp/issues/454
The specific solution is to add the --unsafe-perm
parameter during installation
npm install --unsafe-perm --verbose -g node-gyp
After installing scrypt, executing remix-ide
still reported an error, continue to explore, and finally found a solution
https://github.com/barrysteyn/node-scrypt/issues/108
Specific implementation
cd /services/apps/node-v8.9.3-linux-x64/lib/node_modules/scrypt
node-gyp configure build
Compiled successfully
Finally, execute remix-ide
, perfect, successful start
Welcome to subscribe to "Uncle K Blockchain"-Focus on blockchain technology learning
Blog address: http://www.jouypub.com
Short Book Homepage: https://www.jianshu.com/u/756c9c8ae984
segmentfault homepage: https://segmentfault.com/blog/jouypub
Tencent Cloud Homepage: https://cloud.tencent.com/developer/column/72548
Recommended Posts