错误现象

const { Math, Object, Reflect } = primordials;

原因

使用了最新的node版本

解决

使用稳定版本,参考官网说明,目前10.x的版本是稳定版本(LTS)

yarn的使用

避免和npm混用

安装

  • 推荐:npm install -g yarn
  • 不推荐:brew install yarn会覆盖node版本,安装最新的node版本(不是LTS版本),安装的node版本不够稳定

homebrew安装指定版本的node

brew search node然后选择一个node版本

参考

https://yarnpkg.com/zh-Hans/docs/install#mac-stable

https://blog.csdn.net/yw00yw/article/details/81354533

相关文章:

  • 2021-12-01
  • 2021-07-27
  • 2021-09-18
  • 2021-12-08
  • 2021-09-29
  • 2022-12-23
  • 2021-08-14
  • 2021-09-13
猜你喜欢
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2021-04-06
  • 2021-07-18
  • 2021-07-21
相关资源
相似解决方案