Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 下开发项目问题 #101

Closed
xiaoiver opened this issue Nov 28, 2019 · 10 comments
Closed

Windows 下开发项目问题 #101

xiaoiver opened this issue Nov 28, 2019 · 10 comments
Assignees
Labels
bug 这个是一个 bug

Comments

@xiaoiver
Copy link
Contributor

xiaoiver commented Nov 28, 2019

需要在 CONTRIBUTING.md 中补充 Windows 环境下开发项目的内容。

  1. 由于使用了 Yarn workspace,首先需要安装 Yarn:https://yarnpkg.com/en/docs/install#windows-stable
  2. yarn install 安装依赖,完成 workspace 链接
  3. 测试方案依赖 headless-gl,因此需要 node-gyp 编译本地依赖,这一步是 Windows 下出现问题最多的。
    a. 首先以管理员身份启动 PowerShell

屏幕快照 2019-11-28 下午3 59 13

b. 运行 npm install --global --production windows-build-tools,安装 Microsoft's windows-build-tools 。这一步会安装 Python 2.7

屏幕快照 2019-11-28 下午4 49 47

c. 参考,需要下载 Visual C++ Build Tools 并安装。Win7 以下安装 2013,Win10 及以上安装 2015
d. 重启

@xiaoiver xiaoiver added the bug 这个是一个 bug label Nov 28, 2019
@xiaoiver xiaoiver self-assigned this Nov 28, 2019
xiaoiver added a commit that referenced this issue Nov 28, 2019
@xiaoiver
Copy link
Contributor Author

xiaoiver commented Nov 29, 2019

安装 Visual C++ Build Tools 时可能出现如下问题:
屏幕快照 2019-11-29 上午11 33 22

需要先下载并安装 .NET 4.5.1
安装结束后会提示“需要重启”。

xiaoiver added a commit that referenced this issue Nov 29, 2019
* fix(windows): preparing Windows environment

* re #101, add `CONTRIBUTING.md`

* chore(windows): fix lerna watch command in Windows
lzxue pushed a commit that referenced this issue Mar 5, 2020
* fix(windows): preparing Windows environment

* re #101, add `CONTRIBUTING.md`

* chore(windows): fix lerna watch command in Windows
lzxue pushed a commit that referenced this issue Mar 5, 2020
* fix(windows): preparing Windows environment

* re #101, add `CONTRIBUTING.md`

* chore(windows): fix lerna watch command in Windows
lzxue pushed a commit that referenced this issue Mar 5, 2020
* fix(windows): preparing Windows environment

* re #101, add `CONTRIBUTING.md`

* chore(windows): fix lerna watch command in Windows
lzxue pushed a commit that referenced this issue Mar 6, 2020
* fix(windows): preparing Windows environment

* re #101, add `CONTRIBUTING.md`

* chore(windows): fix lerna watch command in Windows
@guoliangli123
Copy link

yarn install 的过程就失败了,提示sharp安装失败。
image

@yeastone
Copy link

yeastone commented Aug 6, 2020

Mac 怎么装有教程吗? QAQ

@Binks123
Copy link

根据贡献文档指引,在使用npm install --global --production windows-build-tools命令时,出现如下报错,排查了很久未能找到解决方法😭,请问如何解决
image

@zheyi420
Copy link

根据贡献文档指引,在使用npm install --global --production windows-build-tools命令时,出现如下报错,排查了很久未能找到解决方法😭,请问如何解决 image

作者说新的 Node for Windows 包含了要用来构建的工具了。
我没有下载 windows-build-tools,更新 Node 版本,yarn testyarn coveralls 都可以成功运行通过的,

我的配置 node v16.16.0

Please note that the official Node.js for Windows installer can now automatically install the required tools.

参考 https://github.com/felixrieseberg/windows-build-tools#readme

@code-maker-code
Copy link
Contributor

根据贡献文档指引,在使用npm install --global --production windows-build-tools命令时,出现如下报错,排查了很久未能找到解决方法😭,请问如何解决 image

作者说新的 Node for Windows 包含了要用来构建的工具了。 我没有下载 windows-build-tools,更新 Node 版本,yarn testyarn coveralls 都可以成功运行通过的,

我的配置 node v16.16.0

Please note that the official Node.js for Windows installer can now automatically install the required tools.

参考 https://github.com/felixrieseberg/windows-build-tools#readme

我在管理员权限下运行
npm install --global windows-build-tools
安装的是2.7版本的python,而现在需要的python版本是>=3.6.0
image

@code-maker-code
Copy link
Contributor

配置:Windows11系统下 node v16.16.0版本(用nvm安装,未尝试更高版本)
首先安装3.6.0版本以上的python,找出python安装路径,如C:\Users\42297\anaconda3\python.exe
在L7项目安装路径terminal下运行 npm config set python "C:\Users\42297\anaconda3\python.exe"
然后运行yarn install即可

@lzxue
Copy link
Contributor

lzxue commented Nov 9, 2023

配置:Windows11系统下 node v16.16.0版本(用nvm安装,未尝试更高版本) 首先安装3.6.0版本以上的python,找出python安装路径,如C:\Users\42297\anaconda3\python.exe 在L7项目安装路径terminal下运行 npm config set python "C:\Users\42297\anaconda3\python.exe" 然后运行yarn install即可

能否写个完整的版的 Window 开发环境按照教程?

@code-maker-code
Copy link
Contributor

配置:Windows11系统下 node v16.16.0版本(用nvm安装,未尝试更高版本) 首先安装3.6.0版本以上的python,找出python安装路径,如C:\Users\42297\anaconda3\python.exe 在L7项目安装路径terminal下运行 npm config set python "C:\Users\42297\anaconda3\python.exe" 然后运行yarn install即可

能否写个完整的版的 Window 开发环境按照教程?

可以,我是直接修改.github\CONTRIBUTING.md和.github\CONTRIBUTING_ENGLISH.md这两个文档里Windows 环境配置这部分然后提pr吗

@lzxue
Copy link
Contributor

lzxue commented Nov 9, 2023

配置:Windows11系统下 node v16.16.0版本(用nvm安装,未尝试更高版本) 首先安装3.6.0版本以上的python,找出python安装路径,如C:\Users\42297\anaconda3\python.exe 在L7项目安装路径terminal下运行 npm config set python "C:\Users\42297\anaconda3\python.exe" 然后运行yarn install即可

能否写个完整的版的 Window 开发环境按照教程?

可以,我是直接修改.github\CONTRIBUTING.md和.github\CONTRIBUTING_ENGLISH.md这两个文档里Windows 环境配置这部分然后提pr吗

可以的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 这个是一个 bug
Projects
None yet
Development

No branches or pull requests

8 participants