question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating with-tailwindcss example instead creates with-tailwind-emotion

See original GitHub issue

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System: Platform: win32 Arch: x64 Version: Windows 10 Home Binaries: Node: 16.17.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 12.3.0 eslint-config-next: N/A react: 18.1.0 react-dom: 18.1.0

Which example does this report relate to?

with-tailwindcss

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

When calling yarn create next-app --example with-tailwindcss test or npx create-next-app --example with-tailwindcss test the project created is pulled from with-tailwindcss-emotion, rather than with-tailwindcss.

Expected Behavior

A project is created from with-tailwindcss example.

To Reproduce

Call yarn create next-app --example with-tailwindcss test or npx create-next-app --example with-tailwindcss test.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
agusthascommented, Sep 11, 2022

I’ve realized I was slightly mistaken - the repo is not pulled from with-tailwindcss-emotion. It seems largely based on the emotion example but it’s slightly different. I’m not exactly sure where it’s coming from. It is very similar to the with-tailwindcss-emotion repo. The components folder is the same, and it has the same .babelrc specifying emotion, but there is no emotion in the package.json. Not sure if there’s a way I can figure out where exactly it’s pulling from?

Edit: The readme calls itself the with-tailwindcss example, but it’s clearly not the current with-tailwindcss example.

I’ve checked the examples for with-tailwindcss-emotion and with-tailwindcss. It seems that the result repo is pulled from both of them and the cli try to merge them.

Later digging on the create-next-app on canary release, i found this line interesting https://github.com/vercel/next.js/blob/fc3ef810ba3cfddd7763ad6fc498a6f2cddc3064/packages/create-next-app/helpers/examples.ts#L125

It seems that since both examples folder name with-tailwindcss and with-tailwindcss-emotion includes the word with-tailwindcss, then they both get pulled, extracted, and then merged?

1reaction
balazsorban44commented, Sep 13, 2022

@agusthas very good catch, I opened a PR to make the path matching more precise when extracting the files. #40513

Read more comments on GitHub >

github_iconTop Results From Across the Web

When creating a next js and tailwind css app , -e or
I'm using the commands to create a js project and i've done so many times, the commands i use to create a next.js...
Read more >
Install Tailwind CSS with Next.js
Create your project. Start by creating a new Next.js project if you don't have one set up already. The most common approach is...
Read more >
How to Create a Next.js, TypeScript and Tailwind CSS Project
A step-by-step guide explaining how to create an application using Next.js, TypeScript, and Tailwind CSS.
Read more >
Build a Website with Tailwind CSS | Project Tutorial - YouTube
Build a website with Tailwind CSS in this Tailwind CSS project tutorial. You will learn how Tailwind CSS applies media query breakpoints, ...
Read more >
Debugging Tailwind CSS and Next.js - LogRocket Blog
Common issues with Tailwind CSS and Next.js; Setting up a sample Next.js ... instead of purge; Use correct paths; Use the Next.js example...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found