I have the following error when using the Parcel.js packaged project:
I After carefully checking the code and verifying that the project is not problematic, there is no way to help only help the universal Google, the result is found on GitHub, and Parcel.js uses the Async function, the default node.js 8 or more, If you are below 8, you need to use the Babel configuration. I have viewed my own node.js version, as follows:
After finding the problem, I want to upgrade Node not to solve the problem. But again, the company has recently been doing the project to Node, and the rapid development of the project has been troublesome. At this time, I thought of NVM, in fact, I have seen it earlier. At that time, I felt that the computer had installed the Node environment, and I didn’t use it if I uninstall it. But now you need to use the new version of Node to use PARCEL.JS, I decided to uninstall Node, reuse NVM installation, manage the Node version. The question I encountered first was how to completely uninstall Node under Mac, because when using homebrew installed, it feels uninstalled, it should not be thorough. So I checked a lot of documentation online, I personally practiced as follows:
under Mac OS, unload Node
1. Delete all Node in / usr / local / lib and Node_Modules 2. Delete all Node and Node_Modules in / usr / local / lib 3. If it is installed from Brew, run Brew Uninstall Node4. Check ~ / in all local Local , lib or include folder, delete all node and node_modules
5. In / usr / local / bin, delete all Node executable
6. Finally run the followingCode:
Haha, just switch the Node version, feel awesome.
After uninstalling Node, then follow the NVM installation document on GitHub. Step. With NVM, you can switch you with your favorite, and you want any version of Node.
The above is the shortcoming of the short-knit to pack the wrong to select NVM, I hope that everyone can help, if everyone has any If you have questions, please leave a message, the small package will reply to everyone in time. Thank you very much for your support of Tumi Cloud Website!