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

TypeError: process.cwd is not a function (it is undefined) on React Native #148

Closed
kraenhansen opened this issue Nov 14, 2023 · 0 comments · Fixed by #147
Closed

TypeError: process.cwd is not a function (it is undefined) on React Native #148

kraenhansen opened this issue Nov 14, 2023 · 0 comments · Fixed by #147

Comments

@kraenhansen
Copy link
Contributor

Environment

pathe on React Native

Reproduction

  • Create a new React Native app.
  • Import pathe
  • Call pathe.resolve("/").

Describe the bug

Some runtimes (like React Native) has a process global, but doesn't provide a cwd function, this results in a runtime error when importing the package from a React Native project.

Additional context

No response

Logs

TypeError: process.cwd is not a function (it is undefined)
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

Successfully merging a pull request may close this issue.

1 participant