gulp
gulp copied to clipboard
Getting an error in yargs-parser after installing gulp
Before you open this issue, please complete the following tasks:
- [ x] use the search bar at the top of the page to search this repository for similar issues or discussions that have already been opened.
- [ x] if you are looking for help from the gulp team or community, open a discussion.
- [ x] if you think there is a problem with the plugin you're using, open a discussion.
- [ x] if you think there is a bug in our code, open this issue.
What were you expecting to happen?
I installed Node, then installed gulp-cli. I'm following the "Quick Start" page, and expect the gulp command lines to work.
What actually happened?
Running gulp --version
after installing gulp-cli and gulp results in the following output:
C:\Users\eric\AppData\Roaming\npm\node_modules\gulp-cli\node_modules\yargs\node_modules\yargs-parser\index.js:20
;(aliasevar camelCase = require('camelcase')
^^^^^^^^^
SyntaxError: Unexpected identifier 'camelCase'
at internalCompileFunction (node:internal/vm:77:18)
at wrapSafe (node:internal/modules/cjs/loader:1288:20)
at Module._compile (node:internal/modules/cjs/loader:1340:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (C:\Users\eric\AppData\Roaming\npm\node_modules\gulp-cli\node_modules\yargs\yargs.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
Node.js v20.11.0
Please give us a sample of your gulpfile
I haven't even gotten that far yet in the Quick Start guide. :)
Terminal output / screenshots
I ran npm install --global gulp-cli
. I then created a project with npm init
and within the project ran npm install --save-dev gulp
. The next step in the guide says to run gulp --version
and that's where I experience the issue with the yargs-parser module.
C:\Sites\Code>gulp --version
C:\Users\eric\AppData\Roaming\npm\node_modules\gulp-cli\node_modules\yargs\node_modules\yargs-parser\index.js:20
;(aliasevar camelCase = require('camelcase')
^^^^^^^^^
SyntaxError: Unexpected identifier 'camelCase'
at internalCompileFunction (node:internal/vm:77:18)
at wrapSafe (node:internal/modules/cjs/loader:1288:20)
at Module._compile (node:internal/modules/cjs/loader:1340:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (C:\Users\eric\AppData\Roaming\npm\node_modules\gulp-cli\node_modules\yargs\yargs.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
Node.js v20.11.0
Please provide the following information:
- OS & version [e.g. MacOS Catalina 10.15.4]: Windows 11 23H2
- node version (run
node -v
): v20.11.0 - npm version (run
npm -v
): 1.4.0 - gulp version (run
gulp -v
): I wish this worked. :)
Additional information
No additional information.