Lexical error - Unrecognized text after update to 2.0
After updating the @nuxt/tailwind version, this error appears to me
Version
@nuxtjs/tailwindcss: 2.0.0 nuxt: 2.0.0 node: 12.16.3
Steps to reproduce
npm run build
What is Expected?
Build succeeded
What is actually happening?
ERROR in ./assets/css/tailwind.css (./node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/postcss-loader/src??ref--3-oneOf-1-2!./assets/css/tailwind.css)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
JisonLexerError: Lexical error on line 1: Unrecognized text.
Erroneous area:
1: 7rem; * calc(1 - var(--space-y-reverse))
^......^
at /app/node_modules/tailwindcss/utilities.css:1:1
at Object.parseError (/app/node_modules/postcss-calc/dist/parser.js:1200:15)
at Object.lexer_parseError [as parseError] (/app/node_modules/postcss-calc/dist/parser.js:2333:44)


Can you please rm -rf node_modules/ and npm or yarn install again?
I forgot to mention that this happens in the deployment process. Then it goes through the entire flow through a docker image
FROM keymetrics/pm2:12-slim
WORKDIR /app
COPY ./package.json .
RUN rm -rf node_modules
RUN npm install
WORKDIR /app
COPY --from=intermediate /app .
COPY ./ .
RUN npm run build
EXPOSE 80
CMD [ "pm2-runtime", "start", "ecosystem.config.js" ]
That line is intriguing to me:
7rem; * calc(1 - var(--space-y-reverse))
What's the function of * here? Could you provide the source context of this line?
@mornir this line isn't on my source code 🤯 Probably is from tailwind's source code
ah ok 😅
experiencing same weirdness extending maxWidth and getting a blocker with auto * calc(1 - var(--space-y-reverse)).
Actual Error:
ERROR in ./src/css/main.css (./node_modules/postcss-loader/src??ref--5-2!./src/css/main.css)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
still investigating...
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.
👀
Do you have any reproduction I could look at?
I recently ran into this issue when updating to 2.0
I am running into the issue, when trying to change or extend spacing.
This is my spacing config:
extend: {
spacing: { ...spacing },
}
Spacing:
module.exports = {
'full': '100%',
'auto': 'auto',
'initial': 'initial',
'0': '0rem'
}
I figure out that has to do with:
full': '100%',
'auto': 'auto',
'initial': 'initial',
I'm not sure why this is closed but here is the fix:
- Go to your TailwindCSS config file, in my case is
tailwind.js - Remove
auto: 'auto'fromtheme.spacing
Fixed!