-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Failed to compile - Error: Can't resolve '...' .bg- #8503
-
What version of Tailwind CSS are you using?
"react": "^17.0.2",
"cross-env": "7.0.3",
"cssnano": "5.1.10",
"postcss-cli": "9.1.0",
"react-error-overlay": "^6.0.9",
"release-it": "13.6.4",
"tailwindcss": "^3.0.24",
"autoprefixer": "^10.4.7"
Describe your issue
Hi,
I am encountering a problem with the latest version of tailwindcss.
It generates "background-image: url('...');" in tailwind.output.css, the three dots '...' cannot be resolved.
Screenshot 2022年06月02日 at 18 29 37
Screenshot 2022年06月02日 at 18 31 39
Is there any configuration issues or is there a bug with my current stup ?
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2
Hey! Those look like classes being generated based on Tailwind's test suite, which makes me think your content
configuration is watching node_modules
when it shouldn't be.
https://tailwindcss.com/docs/content-configuration#pattern-recommendations
Replies: 1 comment 9 replies
-
Hey! Those look like classes being generated based on Tailwind's test suite, which makes me think your content
configuration is watching node_modules
when it shouldn't be.
https://tailwindcss.com/docs/content-configuration#pattern-recommendations
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2
-
Were you able to solve this?
Beta Was this translation helpful? Give feedback.
All reactions
-
@ZeeshanAhmadKhalil same here
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 2
-
I am getting this error:
Module not found: Can't resolve './${selectedImagePath}' Import trace for requested module: ./styles/globals.css ./pages/_app.js
because I used variable inside the tailwind class as follows
bg-[url('${selectedImagePath}')]
Now i am unable to reset my output file
globals.css
and the error persists.
delete the
I am getting this error:
Module not found: Can't resolve './${selectedImagePath}' Import trace for requested module: ./styles/globals.css ./pages/_app.js
because I used variable inside the tailwind class as follows
bg-[url('${selectedImagePath}')]
Now i am unable to reset my output file
globals.css
and the error persists.
Delete the bg variable save and restart the server, then put a working bg variable in, then save and refresh the server, it will reset your global css. I have no clue how to make it display properly sadly.
Beta Was this translation helpful? Give feedback.
All reactions
-
@boblamceo i found an old yarn.lock
file which made it run. I was unable to resolve the above error which I get when generating new yarn.lock
file and then implementing the above solution.
Beta Was this translation helpful? Give feedback.
All reactions
-
@tomBoyd9002 How were you able to resolve your issue?
Beta Was this translation helpful? Give feedback.