-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
注:在 image 中保留 yarn,同时提供 npm 5.x。这里将创建 image 时 fec-builder 本身的依赖使用 npm 安装,项目的 |
&& 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 |
There was a problem hiding this comment.
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 可能会出现问题
There was a problem hiding this comment.
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 | ||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个只是 build image 的时候执行,执行过一次以后就走 docker 的缓存了,暂时不用加
可以吧,我不用 image 里的,你那边合适就行 |
@doxiaodong 嗯,暂时对 node 8.x 还没啥信心,等我信心够了再升...image 是用到 jenkins 构建里的,直接影响线上结果,我虚啊 |
哈,node 8 lts 就快来了,不要慌 |
#16 用 npm 替代 yarn