GeekyAnts / NativeBase

Mobile-first, accessible components for React Native & Web to build consistent UI across Android, iOS and Web.
https://nativebase.io/
MIT License
20.19k stars 2.38k forks source link

create-next-app -example nextjs-with-native-base-typescript complains ERESOLVE unable to resolve dependency tree #4369

Open sharils opened 2 years ago

sharils commented 2 years ago

Describe the bug When I follow Install in Next.js project document and run npx create-next-app -example https://github.com/GeekyAnts/nativebase-templates/tree/master/nextjs-with-native-base-typescript, it complains ERESOLVE unable to resolve dependency tree. I can also replicate with docker node alpine image.

To Reproduce Steps to reproduce the behaviour:

  1. Run cd /tmp
  2. Run npx create-next-app -example https://github.com/GeekyAnts/nativebase-templates/tree/master/nextjs-with-native-base-typescript
  3. Enter y to Ok to proceed?
  4. Enter cna to What is your project named?

To reproduce with docker:

  1. Run docker run --interactive --rm --tty node:16-alpine sh
  2. Run cd /tmp
  3. Run npx create-next-app -example https://github.com/GeekyAnts/nativebase-templates/tree/master/nextjs-with-native-base-typescript
  4. Enter y to Ok to proceed?
  5. Enter cna to What is your project named?

Expected behaviour App directory is initialised without any error.

Platform

Ajamuar commented 2 years ago

Hi @sharils, this should not be happening. The same commands seem to work in the non-docker environment. We are taking a look at what may be causing the issue. In the meanwhile, you can clone this repo directly: https://github.com/GeekyAnts/nativebase-templates/tree/master/nextjs-with-native-base-typescript

We'll get back to you as soon as we have more details about this.

You can also look into this StackOverflow answer: https://stackoverflow.com/questions/64573177/unable-to-resolve-dependency-tree-error-when-installing-npm-packages

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

silgal commented 2 years ago

Still doesn't work inside docker, doesn't work outside of docker either.

amars29 commented 2 years ago

Hi @silgal, Please run npm config set legacy-peer-deps true in the root directory before running the nextjs script.

silgal commented 2 years ago

https://github.com/GeekyAnts/nativebase-docs/pull/261

amars29 commented 2 years ago

Hi @silgal, we are resolving the issue with npx. Meanwhile you can use yarn command i.e. yarn create next-app -e https://github.com/GeekyAnts/nativebase-templates/tree/master/nextjs-with-native-base-typescript

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.