This repository was archived by the owner on May 19, 2026. It is now read-only.
chore: node version locked#355
Merged
Merged
Conversation
Contributor
Author
|
@pomelo-nwu CI好像得修下,都是红的 😆 |
Member
是 build g6vp docker 镜像挂了... |
Member
@tyn1998 刚看了下是这个问题:https://stackoverflow.com/questions/76435306/babel-preset-react-app-is-importing-the-babel-plugin-proposal-private-propert 在另一个分支上提个了 commit 修复了:721a661#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R60 你的这个我就先合并了,影响不大 |
16 tasks
tyn1998
commented
Jun 24, 2023
Comment on lines
+14
to
+17
| "build": "node --experimental-json-modules scripts/pre-build.mjs && NODE_OPTIONS=--max_old_space_size=4096 umi build", | ||
| "build:docker": "cd ../../ && npm run build:all:umd && cd packages/gi-site/ && BUILD_MODE=docker node scripts/pre-build.mjs && node scripts/copy-assets.mjs && BUILD_MODE=docker NODE_OPTIONS=--max_old_space_size=4096 umi build", | ||
| "deploy": "node ./scripts/deploy.js", | ||
| "start": "node scripts/pre-build.mjs && cross-env NODE_OPTIONS=--max_old_space_size=4096 cross-env PORT=8000 umi dev" | ||
| "start": "node --experimental-json-modules scripts/pre-build.mjs && cross-env NODE_OPTIONS=--max_old_space_size=4096 cross-env PORT=8000 umi dev" |
Contributor
Author
There was a problem hiding this comment.
这个--experimental-json-modules在16.14版本还是需要的,但是16.20版本就已经不需要了。具体是哪个版本开始不需要这个flag的我没有实测,总之是追加一个评论FYI。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👀 PR includes
✨ Feature
🎨 Enhance
🐛 Bugfix
🔧 Chore
📝 Description
锁定 Node 版本为 16,因为:
此外,还在根目录添加了
.nvmrc文件,这样的话进入子包目录也会自动切换node版本为16。根据这个调整修改了README和CONTRIBUTION文件。另外经过测试,Node 18版本及以上不需要
--experimental-json-modules这个flag就能import json modules,但是16及以下版本需要,否则会报错,于是像 #271 那样在gi-site/package.json中添加了这个flag。🔗 Related issue link
close #257,还可以参考的:#254 (review)
🔍 Self-Check before the merge