安装node_modules后出现此错误。
TypeError: Cannot create property 'lastUpdateCheck' on string 'lastUpdateCheck 1713521810483 nodeLinker node-modules ces nodeLinker node-modules'
at /Users/vijayalakshmi/Desktop/e-com/ECommerceApp/.yarn/releases/yarn-1.22.22.cjs:100249:32
at Generator.next (<anonymous>)
at step (/Users/vijayalakshmi/Desktop/e-com/ECommerceApp/.yarn/releases/yarn-1.22.22.cjs:310:30)
at /Users/vijayalakshmi/Desktop/e-com/ECommerceApp/.yarn/releases/yarn-1.22.22.cjs:328:14
at new Promise (<anonymous>)
at new F (/Users/vijayalakshmi/Desktop/e-com/ECommerceApp/.yarn/releases/yarn-1.22.22.cjs:25832:28)
at /Users/vijayalakshmi/Desktop/e-com/ECommerceApp/.yarn/releases/yarn-1.22.22.cjs:307:12
at YarnRegistry.saveHomeConfig (/Users/vijayalakshmi/Desktop/e-com/ECommerceApp/.yarn/releases/yarn-1.22.22.cjs:100253:7)
at /Users/vijayalakshmi/Desktop/e-com/ECommerceApp/.yarn/releases/yarn-1.22.22.cjs:7440:38
at Generator.next (<anonymous>)
“反应”:“18.2.0”, “反应本机”:“0.74.0”,
现在使用节点 v18.17.1 (npm v9.6.7)
尝试将节点版本升级到v19,仍然出现此错误。
这可能值得尝试:
1。清理纱线缓存
yarn cache clean
2。删除节点模块并重新安装
rm -rf node_modules
yarn install
或者,尝试切换到
npm
或 pnpm
以查看此错误是否已解决。如果是,则值得检查您的纱线版本和配置。
另外,请分享您的
package.json
,然后我会尝试在本地安装它,看看可能存在什么问题。