Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ENOENT: no such file or directory #296

Open
edyth933 opened this issue Sep 11, 2024 · 1 comment
Open

Error: ENOENT: no such file or directory #296

edyth933 opened this issue Sep 11, 2024 · 1 comment

Comments

@edyth933
Copy link

edyth933 commented Sep 11, 2024

When run npx cap add @capacitor-community/electron, an error occurs like this;

[Error: ENOENT: no such file or directory, stat '~/monorepo/packages/client/node_modules/@capacitor-community/electron/template.tar.gz''] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'stat',
  path: '~/monorepo/packages/client/node_modules/@capacitor-community/electron/template.tar.gz''
}

also these errors occur:

Unable to find node_modules/@vitejs/plugin-react-swc.
Are you sure @vitejs/plugin-react-swc is installed?
Unable to find node_modules/vite-plugin-top-level-await.
Are you sure vite-plugin-top-level-await is installed?

I am running this in ~/monorepo/packages/client, but the dependency packages is located in ~/monorepo/node_modules. I expect this should work like npx vite.

@Ainias
Copy link

Ainias commented Sep 21, 2024

I've had the same error. As a workaround, I added an old version to the root-package.json. Therefore it will be installed in the node_modules of the package itself and not the root node_modules. I use npm as package-manager. No idea if it works with other package-managers.
But be aware, that this plugin here is expecting other packages to be installed on the monorepo/package-level and not the root level

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

No branches or pull requests

2 participants