Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

ENOENT when using yarn 2 (since node_modules doesn’t exist) #1695

Open
flying-sheep opened this issue Jan 31, 2022 · 1 comment
Open

ENOENT when using yarn 2 (since node_modules doesn’t exist) #1695

flying-sheep opened this issue Jan 31, 2022 · 1 comment

Comments

@flying-sheep
Copy link

Yarn 2 doesn’t use node_modules, so the following line doesn’t work:

const gatsbyPath = path.join(repoRootPath, 'node_modules/.bin/gatsby')

@nicolo-ribaudo
Copy link
Contributor

As a workaround, you could enable node_modules in Yarn 2: https://yarnpkg.com/configuration/yarnrc#nodeLinker

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants