Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting an error in yargs-parser after installing gulp #2753

Closed
Vinny636 opened this issue Feb 4, 2024 · 1 comment
Closed

Getting an error in yargs-parser after installing gulp #2753

Vinny636 opened this issue Feb 4, 2024 · 1 comment

Comments

@Vinny636
Copy link

Vinny636 commented Feb 4, 2024

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.

@yocontra
Copy link
Member

yocontra commented Apr 6, 2024

Can you check if this is fixed in v5? Going to close this, but if you still have this issue I will reopen.

@yocontra yocontra closed this as completed Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants