yeoman / yo

CLI tool for running Yeoman generators
http://yeoman.io
BSD 2-Clause "Simplified" License
3.85k stars 400 forks source link

SyntaxError: Unexpected token after Installing CLI #572

Open gilbertlucas46 opened 6 years ago

gilbertlucas46 commented 6 years ago

Type of issue

Bug


My environment

Expected behavior

I Received this error while running yo wordpress

SyntaxError: Unexpected token %
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/inquirer/lib/ui/baseUI.js:3:22)

I recently installed yeoman and I confirm that it finished properly

here's the results after I installed yeoman using npm install --global yo

/usr/local/bin/yo -> /usr/local/lib/node_modules/yo/lib/cli.js
/usr/local/bin/yo-complete -> /usr/local/lib/node_modules/yo/lib/completion/index.js

> yo@2.0.1 postinstall /usr/local/lib/node_modules/yo
> yodoctor

Yeoman Doctor
Running sanity checks on your system

✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ Node.js version
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✔ npm version

Everything looks all right!
+ yo@2.0.1
updated 1 package in 21.86s
gilberts-MBP:~ gilbertlucas$

But when I check if its installed yo --version

I see the same Syntax error above

SyntaxError: Unexpected token by the way I followed this instructions on how to install wordpress using npm: http://selfteach.me/set-up-wordpress-site-smart/

Current behavior

Steps to reproduce the behavior

Basicall I just installed Yeoman

Command line output

Paste your error output over here
SyntaxError: Unexpected token %
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/inquirer/lib/ui/baseUI.js:3:22)
jymjam commented 2 years ago

@gilbertlucas46 Hey! by any chance, did you find a solution to this and remember how?