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

NPM Install issue as part of Yo #51

Closed
AFurryCat opened this issue May 4, 2020 · 2 comments
Closed

NPM Install issue as part of Yo #51

AFurryCat opened this issue May 4, 2020 · 2 comments

Comments

@AFurryCat
Copy link

I get the following whilst running npm i -g yo

[user@ip ~]$ npm i -g yo
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
/usr/bin/yo -> /usr/lib/node_modules/yo/lib/cli.js
/usr/bin/yo-complete -> /usr/lib/node_modules/yo/lib/completion/index.js

> [email protected] postinstall /usr/lib/node_modules/yo/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> [email protected] postinstall /usr/lib/node_modules/yo/node_modules/ejs
> node ./postinstall.js


> [email protected] postinstall /usr/lib/node_modules/yo/node_modules/spawn-sync
> node postinstall


> [email protected] postinstall /usr/lib/node_modules/yo
> yodoctor

/usr/lib/node_modules/yo/node_modules/yeoman-doctor/lib/index.js:12
  (async () => {
         ^

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> (/usr/lib/node_modules/yo/node_modules/yeoman-doctor/lib/cli.js:3:1)
/usr/lib
└── (empty)

npm ERR! Linux 3.10.0-1127.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "-g" "yo"
npm ERR! node v6.17.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `yodoctor`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'yodoctor'.

Doesn't look to be anything I can fix on the local machine, happy to be proven otherwise!

@LitoMore
Copy link
Contributor

See here:

https://github.com/yeoman/doctor/blob/master/package.json#L14

Doctor requires Node.js 8 or later. But you are using Node.js 6.17.1.

@JoshuaKGoldberg
Copy link

SyntaxError: Unexpected token (

Indeed, this is from using syntax not supported in older versions of Node.js.

@JoshuaKGoldberg JoshuaKGoldberg closed this as not planned Won't fix, can't repro, duplicate, stale Jan 24, 2025
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

3 participants