prismicio / slice-machine

A series of tools for developing and deploying website sections with Prismic
https://prismic.io/docs
Apache License 2.0
287 stars 53 forks source link

Automatic upgrade - ENOENT: no such file or directory #1002

Closed MihkelJ closed 1 year ago

MihkelJ commented 1 year ago

Versions

Reproduction

Unfortunately, I didn't find an easy way to reproduce this issue. I just tried to upgrade to the latest version of Slice Machine and got this error. Please let me know if I can provide any additional information.

I'll add the necessary package.json configuration below.

Click to expand! ```json { "engines": { "node": "^14.20.0", "yarn": "1.18.0" }, "dependencies": { "@mui/icons-material": "5.4.2", "@mui/material": "5.4.3", "@mui/styles": "5.4.2", "@mui/x-date-pickers": "5.0.18", "@prismicio/client": "^6.7.3", "@prismicio/helpers": "^2.3.9", "@prismicio/next": "^1.0.2", "@prismicio/react": "^2.5.1", "@prismicio/slice-simulator-react": "^0.2.3", "@tanstack/react-table": "^8.2.3", "classnames": "^2.2.6", "formik": "^2.1.4", "next": "12.3.4", "next-sitemap": "^4.0.5", "react": "17.0.2", "react-dom": "17.0.2", "react-number-format": "4.7.3", "react-query": "^3.39.3", "react-virtual": "^2.10.4", "sharp": "^0.32.1", "typescript": "^4.6.4", "zustand": "^4.3.7" }, "devDependencies": { "@prismicio/types": "^0.2.7", "@types/node": "14.14.20", "@types/react": "17.0.2", "@types/react-dom": "17.0.2", "concurrently": "^8.0.1", "eslint-config-next": "^13.2.4", "slice-machine-ui": "^0.7.1" } } ```

What is expected?

I expect to be able to upgrade to the latest version of Slice Machine.

What is actually happening?

Tried to run:

[//]: # (Arguments)
/home/mihkel/.nvm/versions/node/v14.21.0/bin/node /home/mihkel/WebstormProjects/[repo-name]/.yarn/releases/yarn-1.18.0.cjs add --dev slice-machine-ui@latest

I get the following error:

[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error An unexpected error occurred: "ENOENT: no such file or directory, symlink '../../lib/cjs/main-cli.js' -> '/home/mihkel/.cache/yarn/v4/npm-@puppeteer-browsers-0.5.0-1a1ee454b84a986b937ca2d93146f25a3fe8b670/node_modules/@puppeteer/browsers/.bin/@puppeteer/browsers'".
mdeclercq commented 1 year ago

Hi @MihkelJ,

Thanks for reporting. I could reproduce using the same Yarn version 1.18.0.

This has been reported in the puppeteer repo, see https://github.com/puppeteer/puppeteer/issues/9956. Do you have the possibility to update Yarn to 1.22.19? I tested it and it works fine on my side.

mdeclercq commented 1 year ago

Hi @MihkelJ,

I'm closing the issue now, a workaround was provided in my previous comment.

Don't hesitate to reach out to us in case it comes back or open another issue.

Thanks again for sharing,