Error when running vtex link to link the vtex project with the dependencies from the react folder.
Steps taken:
- react folder:
- root folder (manifest.json folder)
Error:
"react@3.x builder failed to install dependencies through yarn (retries=3)
yarn errors:
expect@29.5.0: The engine
UPDATE, the initial error came back (“The engine "node" is incompatible with this module. Expected version "^14.15.0 || ^16.10.0 || >=18.0.0". Got "12.22.12"”), I’ve already tried uninstalling vtex-tools, using the resolutions key in package.json, but nothing works. Does anyone know a way to fix this? Or is it only possible through a VTEX ticket?
What I did and it worked..
node -v 12.22.12
the react folder was missing the yarn.lock, I copied what was inside the react folder from GitHub: GitHub - vtex-apps/react-app-template: Our guide repository structure for react apps, that should be used as a template. · GitHub
I deleted only the node_modules folder
I ran yarn, then vtex link and it worked.