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

use npm instead of yarn #22

Merged
merged 2 commits into from
Sep 22, 2017
Merged

use npm instead of yarn #22

merged 2 commits into from
Sep 22, 2017

Conversation

nighca
Copy link
Collaborator

@nighca nighca commented Sep 20, 2017

#16 用 npm 替代 yarn

@nighca
Copy link
Collaborator Author

nighca commented Sep 20, 2017

注:在 image 中保留 yarn,同时提供 npm 5.x。这里将创建 image 时 fec-builder 本身的依赖使用 npm 安装,项目的 dependencies 使用 npm 还是 yarn 由 build-prepare.sh 中的命令决定。

&& npm install fs-extra \
&& sed -i -e s/graceful-fs/fs-extra/ -e s/fs\.rename/fs.move/ ./lib/utils/rename.js
# upgrade npm
RUN npm install -g npm@5.4.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里直接用 node 8.0 以上的版本吧
我记得好像 8.0 以下的 装 npm5 可能会出现问题

Copy link
Collaborator Author

@nighca nighca Sep 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我这遇到过王克纯那边 node 8.x 跑 builder 有坑...

升 node 版本的影响面比较大。我本地是一直用的 node 6.x + npm 5.x,目前还没啥问题,毕竟 npm 只是拿来装依赖,我觉得这个风险小一点

&& sed -i -e s/graceful-fs/fs-extra/ -e s/fs\.rename/fs.move/ ./lib/utils/rename.js
# upgrade npm
RUN npm install -g npm@5.4.2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个为了速度的话,可以加上

RUN echo "deb http://mirrors.aliyun.com/debian stretch main\n\
deb http://mirrors.aliyun.com/debian stretch-updates main\n\
deb http://mirrors.aliyun.com/debian-security stretch/updates main" > /etc/apt/sources.list

Copy link
Collaborator Author

@nighca nighca Sep 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个只是 build image 的时候执行,执行过一次以后就走 docker 的缓存了,暂时不用加

@doxiaodong
Copy link
Contributor

可以吧,我不用 image 里的,你那边合适就行

@nighca
Copy link
Collaborator Author

nighca commented Sep 22, 2017

@doxiaodong 嗯,暂时对 node 8.x 还没啥信心,等我信心够了再升...image 是用到 jenkins 构建里的,直接影响线上结果,我虚啊

@doxiaodong
Copy link
Contributor

哈,node 8 lts 就快来了,不要慌

@nighca nighca merged commit 095d200 into qiniu:master Sep 22, 2017
@nighca nighca deleted the use-npm branch September 22, 2017 08:13
@nighca nighca mentioned this pull request Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants