`TypeError: process.cwd is not a function (it is undefined)` on React Native
kraenhansen opened this issue · comments
Kræn Hansen commented
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)