npm 错误:由于版本无效或不受支持,无法反序列化克隆的数据

0md85ypi  于 2022-12-29  发布在  其他
关注(0)|答案(2)|浏览(730)

I use parcel to deploy my web projects and on one occasion I got this error below while trying to deploy the page. I tried several solutions I saw online but none worked for me, I didn't even understand some.

Error: Unable to deserialize cloned data due to invalid or unsupported version.

Error: Unable to deserialize cloned data due to invalid or unsupported version. at deserialize (node:v8:345:7) at deserialize (C:\Users\David Etuk\Documents\Front End Mentor Projects\E-Commerce Site\node_modules@parcel\core\lib\serializer.js:249:48) at RequestTracker.getRequestResult (C:\Users\David Etuk\Documents\Front End Mentor Projects\E-Commerce Site\node_modules@parcel\core\lib\RequestTracker.js:635:54) at async RequestTracker.runRequest (C:\Users\David Etuk\Documents\Front End Mentor Projects\E-Commerce Site\node_modules@parcel\core\lib\RequestTracker.js:725:20) at async applyRuntimes (C:\Users\David Etuk\Documents\Front End Mentor Projects\E-Commerce Site\node_modules@parcel\core\lib\applyRuntimes.js:174:7) at async BundlerRunner.bundle (C:\Users\David Etuk\Documents\Front End Mentor Projects\E-Commerce Site\node_modules@parcel\core\lib\requests\BundleGraphRequest.js:287:25) at async RequestTracker.runRequest (C:\Users\David Etuk\Documents\Front End Mentor Projects\E-Commerce Site\node_modules@parcel\core\lib\RequestTracker.js:725:20) at async Object.run (C:\Users\David Etuk\Documents\Front End Mentor Projects\E-Commerce Site\node_modules@parcel\core\lib\requests\ParcelBuildRequest.js:62:7) at async RequestTracker.runRequest (C:\Users\David Etuk\Documents\Front End Mentor Projects\E-Commerce Site\node_modules@parcel\core\lib\RequestTracker.js:725:20)

arknldoa

arknldoa1#

我解决这个问题的方法是删除**.parcel-cache**、distnode_modules文件夹,然后使用命令“npm install or npm i”重新安装所有丢失的包,并使用命令“npm run start”重新构建(或者使用其他方法处理包裹)。
my screen snip showing the error and the folders to be deleted

mgdq6dx1

mgdq6dx12#

你可以只删除parcel-cache文件夹和/或dist文件夹,这两种方法对我都有效,下次我将尝试只删除.parcel-cache文件夹。
之后,您可以运行run/test命令(即yarn start)来重建所有内容。

相关问题