Do not use the latest version of the node, using the LTS version

Symptom

const { Math, Object, Reflect } = primordials;

the reason

Using the latest version of the node

solve

Use stable version, refer to the official website explained , the current version is stable version 10.x (LTS)

yarn of use

Avoid mix and npm

installation

  • Recommended: npm install -g yarn
  • Not recommended: brew install yarn will cover node version, install the latest version of the node (not the LTS version), installed node version is not stable enough

homebrew install the specified version of the node

brew search node and then select a node version

reference

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

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

Guess you like

Origin www.cnblogs.com/shengulong/p/11609914.html