https://github.com/MetaMask/Website

将这个包下载下来之后运行npm install出现下面的问题

gyp: No Xcode or CLT version detected!

查解决方法是说更新npm版本有用,后面发现没有,但是中间有个问题记录一下

更新npm版本时  npm install npm@latest -g

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/ansi-regex'

原因: 执行命令行命令时没有获得管理员权限

解决:前面加上sudo,即sudo npm install npm@latest -g

下面才是解决办法:

说明xcode的cli工具没有安装,即运行xcode-select --install

然后后面我就运行xcode-select --install 进行安装,然后就会跳出下面的页面:

但是安装不成功,说是不能在软件更新处..找到软件,那就使用另一种安装方式

然后后面就去这个网址(需要登陆)去下载xcode进行安装,根据你的电脑版本自己选择:

https://developer.apple.com/download/more/

然后一步步根据其指示进行安装即可:

然后运行下面的指令,就能够看出xcode-select已经安装成功

Last login: Mon Nov  5 08:58:04 on ttys000
userdeMacBook-Pro:~ user$ xcode-select --install
xcode-select: note: install requested for command line developer tools
userdeMacBook-Pro:~ user$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

然后再npm install就发现还是有错误:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

然后网上就有很多说要改path什么的,但是我发现自己的/Applications下面没有Xcode.app,不太知道怎么回事,我们先看一开始的path是:

userdeMacBook-Pro:~ user$ xcode-select --print-path
/Library/Developer/CommandLineTools

然后后面改会出现问题:

userdeMacBook-Pro:~ user$ xcodebuild -showsdks
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
userdeMacBook-Pro:~ user$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
Password:
xcode-select: error: invalid developer directory '/Applications/Xcode.app/Contents/Developer'

最后发现这么一改就好了:

sudo xcode-select --switch /Library/Developer/CommandLineTools

可能需要定义一下

然后继续进行下一步:

npm run build

然后又会出现下面的问题:

userdeMBP:Website-master user$ npm run build

> metamask-landing@0.0. build /Users/user/Website-master
> node build.js internal/modules/cjs/loader.js:
throw err;
^ Error: Cannot find module 'sass-css-stream'

这时候就将这个模块安装一下:

userdeMBP:Website-master user$ npm install sass-css-stream --save

然后就解决了之前npm install 的问题,因为这时候再运行npm install 就成功了

然后再运行一次npm run build,就成功了

最后就可以打开服务器 npm start

这时候到浏览器中去运行http://localhost:9000,又出现了问题:

userdeMBP:Website-master user$ npm start

> metamask-landing@0.0. start /Users/user/Website-master
> node server.js Now listening on port
/Users/user/Website-master/node_modules/node-static/lib/node-static.js:
mime.lookup(files[]) ||
^ TypeError: mime.lookup is not a function

这是因为mime 2.x.x 版本修改了函数名:

只要去文件/Users/user/Website-master/node_modules/node-static/lib/node-static.js下将lookup()函数名改成getType()即可

然后再运行npm start ,访问http://localhost:9000就能够成功:

MetaMask/Website的更多相关文章

  1. metamask源码学习-background.js

    这个就是浏览器后台所进行操作的地方了,它就是页面也区块链进行交互的中间部分. metamask-background描述了为web扩展单例的文件app/scripts/background.js.该上 ...

  2. ethereum/EIPs-1102 Opt-in provider access metamask不再默认直接连入网页

    eip title author discussions-to status type category created 1102 Opt-in provider access Paul Boucho ...

  3. Guide to Porting MetaMask to a New Environment

    https://github.com/MetaMask/metamask-extension/blob/develop/docs/porting_to_new_environment.md MetaM ...

  4. metamask源码学习-ui/index.js

    The UI-即上图左下角metamask-ui部分,即其图形化界面 The MetaMask UI is essentially just a website that can be configu ...

  5. 在公有云AZURE上部署私有云AZUREPACK以及WEBSITE CLOUD(六)

    (六)在Website Cloud中添加site 1新建Website,并打开 使用前面创建的用户 newbee@waplab.com 登录租户Portal,新建一个website 新建完成后, 可以 ...

  6. 在公有云AZURE上部署私有云AZUREPACK以及WEBSITE CLOUD(五)

    (五)注册Website Cloud 1 注册Website Cloud 添加Website Cloud   连接Website Cloud 注意, endpoint 是使用Management Se ...

  7. 在公有云AZURE上部署私有云AZUREPACK以及WEBSITE CLOUD(四)

    (四)搭建Website Cloud环境 1安装CONTROLLER主机 在开始安装Web site Cloud之前,读者应该对该服务的拓扑结构有个大概了解. 如图: Controller是非常重要的 ...

  8. 在公有云AZURE上部署私有云AZUREPACK以及WEBSITE CLOUD(二)

    前言 (二)建立虚拟网络环境,以及域控和DNS服务器   1搭建虚拟网络环境 在Azure上创建虚拟网络.本例选择的是东南亚数据中心.后面在创建虚机的时候,也选择这个数据中心. VNet Name: ...

  9. Microsoft Azure Web Sites应用与实践【1】—— 打造你的第一个Microsoft Azure Website

    Microsoft Azure Web Sites应用与实践 系列: [1]—— 打造你的第一个Microsoft Azure Website [2]—— 通过本地IIS 远程管理Microsoft ...

随机推荐

  1. spring装配注解(IOC容器加载控制)ComponentScan及ComponentScans使用

    ComponentScan,只写入value,可扫描路径下装配的@Contrller.@Service.@Repository @ComponentScan(value = "com.tes ...

  2. 快速导出云服务器mysql的表数据

    1.许多互联网应用的数据库都布署在远程的Linux云服务器上,我们经常要编辑表数据,导出表数据. 通常的做法是ssh连接到服务器,然后命令登录,命令查询导出数据,费时费力,效率低下. 安装TreeSo ...

  3. Linux安装mysql教程

    安装之前需要先卸载mysql 1.1.下载压缩包 [root@guohaien package]# wget https://dev.mysql.com/get/Downloads/MySQL-5.7 ...

  4. Hadoop HDFS 的 HttpFS

    参考 Hadoop权威指南 第3章中3.4节 背景 要写一个操作HDFS的web后台(文件CRUD),虽然可以直接使用HDFS提供的FileSystem类然后通过get方法获取到一个Distribut ...

  5. python学习之老男孩python全栈第九期_day001知识点总结

    1. Python2与Python3的区别: Python2:源码不标准,混乱,重复代码太多: Python3:统一标准,去除重复代码. 编码方式: python2的默认编码方式为ASCII码:pyt ...

  6. Codeforces Round #545 (Div. 1) 简要题解

    这里没有翻译 Codeforces Round #545 (Div. 1) T1 对于每行每列分别离散化,求出大于这个位置的数字的个数即可. # include <bits/stdc++.h&g ...

  7. WiFi 统一管理以及设备自动化测试实践

    ATX 安卓设备 WiFi 统一管理以及设备自动化测试实践 (零散知识梳理总结) 此文为转载,感谢作者  目录  众所周知,安卓单台设备的UI自动化测试已经比较完善了,有数不清的自动化框架或者工具.但 ...

  8. 关于win10下JDK环境变量的配置以及关于JDK的一些说明

    一.JDK的下载和安装 这里提供32位和64位JDK的下载链接 百度网盘:https://pan.baidu.com/s/1xtiVOE2gPCvlGCTy0vfBaw 密码:c5m4   官网:ht ...

  9. 【Redis】Redis学习(六) Redis 基本运维

    Redis的单机搭建,主从搭建,Sentinal搭建,以及Redis集群搭建的步骤参照前面的文章.现在来说一下Redis的基本运维,毕竟如果一切正常是最好的,但是当出现问题不能使用的时候,准确定位问题 ...

  10. Expo大作战(七)--expo如何使用Genymotion模拟器

    简要:本系列文章讲会对expo进行全面的介绍,本人从2017年6月份接触expo以来,对expo的研究断断续续,一路走来将近10个月,废话不多说,接下来你看到内容,将全部来与官网 我猜去全部机翻+个人 ...