简体   繁体   中英

Tailwind CSS build error | Acorn unexpected token 26:33

I tried to build tailwindcss on default css but this thing appears....


   tailwindcss 2.0.2

   ? Building from default CSS... (No input file provided)

   ? SyntaxError: Unexpected token (26:33)
    at _class.pp$4.raise (C:\xampp\htdocs\www\css\node_modules\acorn\dist\acorn.
js:2927:15)
    at _class.pp.unexpected (C:\xampp\htdocs\www\css\node_modules\acorn\dist\aco
rn.js:698:10)
    at _class.pp.expect (C:\xampp\htdocs\www\css\node_modules\acorn\dist\acorn.j
s:692:28)
    at _class.pp$3.parseObj (C:\xampp\htdocs\www\css\node_modules\acorn\dist\aco
rn.js:2563:14)
    at _class.pp$3.parseExprAtom (C:\xampp\htdocs\www\css\node_modules\acorn\dis
t\acorn.js:2302:19)
    at _class.parseExprAtom (C:\xampp\htdocs\www\css\node_modules\acorn-node\lib
\dynamic-import\index.js:77:117)
    at _class.pp$3.parseExprSubscripts (C:\xampp\htdocs\www\css\node_modules\aco
rn\dist\acorn.js:2129:21)
    at _class.pp$3.parseMaybeUnary (C:\xampp\htdocs\www\css\node_modules\acorn\d
ist\acorn.js:2106:19)
    at _class.parseMaybeUnary (C:\xampp\htdocs\www\css\node_modules\acorn-node\l
ib\private-class-elements\index.js:122:54)
    at _class.pp$3.parseExprOps (C:\xampp\htdocs\www\css\node_modules\acorn\dist
\acorn.js:2041:21)

I tried reinstalling it but nothing changed... how do i fix this?

After wasting a couple of days, I found that there was a simple typo in my tailwind.config.js

    '224': '56rem',
    '256': '64rem'.
    '304': '76rem',

I suggest checking the line 26 within your own config.

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM