H
H
hesy2021-03-05 13:53:48
Node.js
hesy, 2021-03-05 13:53:48

How to overcome the error SyntaxError: missing ) after argument list?

Good afternoon, help me solve the problem)

I’m not strong in the front, with grief in half I initially set up the assembly for my project, everything worked, now I decided to rebuild the layout and I get an error:

error log
PS D:\.dev\dashboard> npm run dev

> [email protected] dev D:\.dev\dashboard
> webpack --config webpack.dev.js

D:\.dev\dashboard\node_modules\webpack\bin\webpack.js:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `webpack --config webpack.dev.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.


Scripts in package.json:
scripts
"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "watch": "webpack --watch --config webpack.dev.js",
    "dev": "webpack --config webpack.dev.js",
    "prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js"
  },


With npm run prodexactly the same error, only the path, respectively, to cross-env.

I can't figure out why this happened, before everything worked fine.
Tried on Linux and Windwos 10, same error.
I tried to specify full paths node ./node_modules/webpack/bin/webpack.jsinstead of webpack, the problem was not solved (

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hesy, 2021-03-05
@hesy

Solution of the question in the comments:
How to overcome the error SyntaxError: missing ) after argument list?
$ rm -rf node_modules package-lock.json
$ npm install

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question