Blog
Next.js Codebase Analysis <> create-next-app <> Execute the local setup

Next.js Codebase Analysis <> create-next-app <> Execute the local setup

You need to do read this prerequisite: Next.js Codebase Analysis <> create-next-app <> Create a local folder before you continue with this next steps.

Execute the local setup

When I copied a package into a new folder and executed the npm run build command. I ran into weird issues.

  1. Pnpm not found

pnpm install

I had to install pnpm.

2. Missing typescript

Not sure why I got this error but I was able to resolve it using this link

3. Boss fight — TS2353: Object literal may only specify known properties, and ‘retries’ does not exist in type ‘Options’.

Any typescript error is a video game boss fight to me. You get the joke!

![](https://miro.medium.com/v2/resize:fit:875/0*m2O1WzhTcfNuBx7c align="left")

I found few useful links listed below, but trying them did not magically fix the issue

  1. https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/60193

  2. https://stackoverflow.com/questions/64583681/object-literal-may-only-specify-known-properties-and-retries-does-not-exist-i

Let me know in the comments what you think about this issue.

But I ended up removing the retries altogether from the create-next-app.ts. Keep in mind Next.js has MIT License hence I made the bold move to make those changes and document them here in this article.

Once I removed the retries, the error was gone. I do not recommend doing this. There must be a good reason why the original authors have retries in place. I have removed it to understand the internal workings of create-next-app without spending a day or two just because I could not get retries options to be type safe.

You need to sometimes decide if the fix you are after is really worth it in the grand scheme of things.

This code ready for execution is available here

Execution

Change create-next-app to create-my-app and then run npx create-my-app.

Your playground is now ready for experiments.

Conclusion

I had to remove retries because of typescript error, I do not know how to fix it yet, my goal is to understand how create-next-app works and I would not worry much about an option that is about retrying. End outcome over temporary setback.

If you have any questions, feel free to reach out to me at ramu.narasinga@gmail.com

Get free courses inspired by the best practices used in open source.

About me:

Hey, my name is Ramu Narasinga. I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.

I am open to work on interesting projects. Send me an email at ramu.narasinga@gmail.com

My Github —  https://github.com/ramu-narasinga

My website —  https://ramunarasinga.com

My Youtube channel —  https://www.youtube.com/@ramu-narasinga

Learning platform —  https://thinkthroo.com

Codebase Architecture —  https://app.thinkthroo.com/architecture

Best practices —  https://app.thinkthroo.com/best-practices

Production-grade projects —  https://app.thinkthroo.com/production-grade-projects