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

browser-external:node:os:9 Module "node:os" has been externalized for browser compatibility. Cannot access "node:os.homedir" in client code. See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details. #19

Closed
Meguais opened this issue Mar 19, 2023 · 4 comments

Comments

@Meguais
Copy link

Meguais commented Mar 19, 2023

i get this error i cant fix can u help me
image

@Meguais
Copy link
Author

Meguais commented Mar 19, 2023

import envPaths from 'env-paths';
const paths = envPaths('MyApp');
console.log(paths)

@sindresorhus
Copy link
Owner

This package is for Node.js, not the browser.

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2023
@Meguais
Copy link
Author

Meguais commented Mar 19, 2023

I was going to use it for electron I want to show the main directory where I installed the program, but I could not

@Meguais
Copy link
Author

Meguais commented Mar 19, 2023

Is there an alternative solution for electron ?
i try app.getPath() but still get this error
there is one different node:os does not write path.join writes

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