postcss / postcss-cli

CLI for postcss
Other
836 stars 93 forks source link

SyntaxError: Unexpected token... const options = { ...config.options } #372

Closed l2zeo closed 3 years ago

l2zeo commented 3 years ago

After updating node.js, the following error is displayed.

...config.options

it turns out that there is a problem with this part.

Can I see what's wrong?

[root@localhost user]# node -v
v12.13.1

/home/user/node_modules/postcss-cli/index.js:205
      const options = { ...config.options }
SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/user/node_modules/postcss-cli/bin/postcss:3:1)
/home/user/node_modules/postcss-cli/index.js:205
      const options = { ...config.options }

package.json

  "scripts": {
    "build:css": "postcss css/tailwind.css -o public_html/build/tailwind.css"
  },
  "dependencies": {
    "@fullhuman/postcss-purgecss": "^3.1.3",
    "@tkh/tailwind-plugin-flex-basis": "^1.4.0",
    "add": "^2.0.6",
    "autoprefixer": "^10.1.0",
    "cssnano": "^4.1.10",
    "express": "^4.17.1",
    "file-system": "^2.2.2",
    "https": "^1.0.0",
    "jquery": "^3.5.1",
    "mysql": "^2.18.1",
    "or": "^0.2.0",
    "postcss": "^8.2.10",
    "postcss-cli": "^8.3.1",
    "smelte": "^1.0.18",
    "socket.io": "^3.0.4",
    "tailwindcss": "^2.1.1",
    "tailwindcss-aspect-ratio": "^3.0.0",
    "watch": "^1.0.2",
    "yarn": "^1.22.10"
  },
RyanZim commented 3 years ago

Are you sure you're running Node 12.13.1? This looks like an error you'd get on an old version of Node.

RyanZim commented 3 years ago

Closing for lack of response.