GeekyAnts / GeekyAnts/NativeBase
HookWebpackError while running with NextJS starter using npm
- Dominant language
- TypeScript
- Stars
- 20.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the bug
Running a NextJS app with the nativebase starter using `npm` gives the following error: `Internal Server Error` on the Browser and `HookWebpackError: Cannot read property 'replace' of undefined` on the Terminal. The app runs fine using `yarn`.
## To Reproduce
Steps to reproduce the behaviour:
1. create a Project with nativebase and NextJS using the command: ` npx create-next-app -example https://github.com/GeekyAnts/nativebase-templates/tree/master/nextjs-with-native-base`
2. Give your project a name when prompted
3. After installation run the command `npm run dev`
4. The Browser shows `Internal Server Error` while the CLI shows `HookWebpackError: Cannot read property 'replace' of undefined`
## Expected behaviour
The App should run properly on the browser showing the homepage.
## Screenshots

## Platform
- NativeBase version 3.2.2
- Device: MacBook Pro (16-inch, i7, 2019)
- OS: MacOS Big Sur 11.4
- Browser: Chrome
- Browser version: 96.0.4664.110
- node : 14.17.5
- npm: 6.14.14
## Additional information
1. The project runs successfully using yarn
2. If `yarn` is installed on the system, `yarn` takes over the installation even when npx command is used for installation and therefore it works fine
3. After installation using `yarn`, npm commands run perfectly
4. Deleting the `yarn.lock` and `node-modules` and reinstalling the packages gives the error described above
3. The issue seems to be coming from `@expo/next-adapter` package
Contributor guide
Assessment
This issue has not been assessed yet.