22

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)

David.E
  • 511
  • 2
  • 4
  • 13

5 Answers5

29

What I did to resolve this was to delete the .parcel-cache, dist, and node_modules folders, then reinstall all lost packages with the command "npm install or npm i" and also build again with the command "npm run start" (or however you do it with parcel).

my screen snip showing the error and the folders to be deleted

David.E
  • 511
  • 2
  • 4
  • 13
5

You can likely get away with just deleting the parcel-cache folder and/or the dist folder. Doing both worked for me, next time I'll experiment with just deleting the .parcel-cache folder.

After that you can run your run/test command (i.e. yarn start) to rebuild everything.

2

Consider deleting the node_modules, dist, parcel-cache then you do yarn install

Freedisch
  • 124
  • 1
  • 9
1

if your project has a .yarn/releases/ folder, try deleting the .cjs file in that folder and adding it back

Jason FB
  • 4,752
  • 3
  • 38
  • 69
0

For me, I was using the wrong Node version. So if you use nvm for managing Node versions, this should work: nvm use 18.16.0 (or whatever version your project uses).

sq1020
  • 1,000
  • 2
  • 9
  • 15