StreakingMan / solvable-sheep-game

能够解出来的“羊了个羊”小游戏demo(react实现,支持自定义主题)
http://solvable-sheep-game.streakingman.com/
GNU General Public License v3.0
386 stars 166 forks source link

yarn build 报错,大佬能帮忙看看吗 #3

Closed lioumin1 closed 2 years ago

lioumin1 commented 2 years ago

请教下大佬这报错是怎么回事呢

`D:\Downloads\Compressed\solvable-sheep-game-master>yarn build yarn run v1.22.10 $ tsc && vite build file:///D:/Downloads/Compressed/solvable-sheep-game-master/node_modules/vite/bin/vite.js:7 await import('source-map-support').then((r) => r.default.install()) ^^^^^

SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:122:18) at async link (internal/modules/esm/module_job.js:42:21) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

StreakingMan commented 2 years ago

vite的报错,可能是node版本的问题,检查下node版本

vite官网的说明:

兼容性注意

Vite 需要 Node.js 版本 14.18+,16+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。

我这边也会增加自动发布打包命令,将打包文件上传

lioumin1 commented 2 years ago

感谢大佬,更新node后可以打包了