Repository navigation
Unexpected identifier #402
Description
Activity
More info:
postcss@8.3.8
postcss-cli@9.0.0uname -a
Linux Acer 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linuxnpm -v
6.14.4Only
Unexpected identifier; no stack trace or anything?Yes, only that.
I am getting the same error on a scheduled CI run:
/usr/lib/node_modules/postcss-cli/index.js:3 import fs from 'fs-extra' ^^ SyntaxError: Unexpected identifier 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 Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) Error: Process completed with exit code 1.It was running well last week so I understand this was introduced recently (#401 apparently). I am not sure if I'm missing dependencies, I tried to install the ESM package with no luck (but I don't have much experience with node).
What Node version are you running (both of you)?
That was a good point, I was running node 10 and just realised the logs had a deprecation warning, I completely missed that one! It is fixed now (currently on version 14).
Reacted by Ryan ZimmermanThank you @gerardcanal for the idea. I was running node 10 (default for Ubuntu 20.04) and I updated it to 14 using NodeSource PPA and the problem is solved.
Yep, postcss-cli v9 requires Node 12 or higher, otherwise, you will get this error.
Hi, I'm new to postcss and I have a problem with a grunt.js that, using postcss+autoprefixer should prefix css but it doesn't.
Trying to find out the cause I ended to simply run:
npm i -D postcss postcss-cliand then:
npx postcssand it returns only:
Unexpected identifierPlease, what could I do to better debug this issue?