npm list -g --depth 0 | grep @vue/cli
(node:50731) ExperimentalWarning: Package name self resolution is an experimental feature. This feature could change at any time
94% after seal[hardsource:a9cf9509] Could not freeze ./src/router/index.js: Cannot read property ‘hash’ of undefined
98% after emitting
dyld: initializer function 0x0 not in mapped image for /usr/local/bin/node
brew uninstall –force node
brew uninstall icu4c && brew install icu4c
brew unlink icu4c && brew link icu4c –force
brew install node
I recently encountered a similar issue (after doing brew switch node 9.8.0 to downgrade to a previous version of node)
dyld: Library not loaded:
Referenced from: /usr/local/bin/node
Reason: image not found
Abort trap: 6
The issue is that node is picky about which version of icu4c it’s looking for, and the version I had installed (62) was higher than node was expecting.
To fix, I made sure I had version 60 of icu4c selected.
First I found which versions I had with brew info icu4c, then did brew switch icu4c 60.2 to select the one node was expecting.
npx create-next-app test-demo
yarn autoclean 功能可以试试
npm install === yarn
// yarn 有npm没有的
npm config ls -l
具体项目： registry 可以在这个里面设置 可以设置 package-lock=false koa就是这么设置的 // 说明:如果设置为false，那么在安装时将忽略package-lock.json文件 package-lock Default: true Type: Boolean If set to false, then ignore package-lock.json files when installing. This will also prevent writing package-lock.json if save is true. When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use npm prune.