1.0 NPM Install - Unexpected Token ...
Using a brand new laravel 5.8 app.
npm install
npm install tailwindcss --save-dev
npx tailwind init
Unexpected token ...
npx tailwind build styles.css -o output.css
Unexpected token ...
I would like to use the latest version of tailwind, but this isn't working. I can use the older version just fine.
Looks like node incompatibility, what's your version? Tailwind 1.0 needs >= 8.9.0
Yeah make sure you are on a supported version of Node and you should be good to go 👍🏻
npx tailwindcss init result showing unexpected token {
bado@DESKTOP-NHE2DH6:~/api2$ npx tailwindcss init
/home/bado/api2/node_modules/color/index.js:257
lum[i] = (chan <= 0.039_28) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
^^^^^
SyntaxError: Invalid or unexpected token
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/bado/api2/node_modules/tailwindcss/lib/util/pluginUtils.js:25:37)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
```
@Eboubaker Upgrade your node to the latest (14.17.6)
I'm getting this
$ npx tailwindcss init -P
Unexpected token import
```[
node -v
v8.16.2
npx -v
10.2.2](`url`)
@nbtafelberg you are on Node 8, the current version of Node is Node 20. The current LTS version is Node 18.
Node 8 was end of life in 2017. I strongly recommend to upgrade all your projects asap to ensure you are on a modern version with all the necessary security fixes applied.