以太坊开发-搭建本地remix开发环境
作者:互联网
1.下载安装nodejs
2.命令行安装remix-ide
npm install remix-ide -g
3.启动remix-ide
remix-ide
4.解决报错
解决方案: 编辑\AppData\Roaming\npm\node_modules\remix-ide\bin\remix-ide,去删除remixd相关内容
去除之前,如下: #!/usr/bin/env node var path = require(‘path’) var httpServer = require(‘http-server’) var remixd = require(‘remixd’) var server = httpServer.createServer({ root: path.join(__dirname, ‘/…/’) }) var folder = process.argv.length > 2 ? process.argv[2] : process.cwd() server.listen(8080, ‘127.0.0.1’, function () {}) var router = new remixd.Router(65520, remixd.services.sharedFolder, { remixIdeUrl: ‘http://localhost:8080’ }, (webSocket) => { remixd.services.sharedFolder.setWebSocket(webSocket) remixd.services.sharedFolder.setupNotifications(folder) remixd.services.sharedFolder.sharedFolder(folder, false) }) router.start() console.log(’\x1b[33m%s\x1b[0m’, 'Starting Remix IDE at http://localhost:8080 and sharing ’ + folder)
去除之后如下: #!/usr/bin/env node var path = require(‘path’) var httpServer = require(‘http-server’) var server = httpServer.createServer({ root: path.join(__dirname, ‘/…/’) }) var folder = process.argv.length > 2 ? process.argv[2] : process.cwd() server.listen(8080, ‘127.0.0.1’, function () {}) console.log(’\x1b[33m%s\x1b[0m’, 'Starting Remix IDE at http://localhost:8080 and sharing ’ + folder)
启动成功后,输入 localhost:8080不行的话,可以考虑加个路径/index ,即:localhost:8080/index,就可以啦
标签:remix,8080,以太,process,开发,remixd,var,path 来源: https://www.cnblogs.com/peteremperor/p/14879640.html