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 ERR! Unexpected token '.' #4303

Closed
2 tasks done
syedbilal07 opened this issue Jan 21, 2022 · 17 comments
Closed
2 tasks done

npm ERR! Unexpected token '.' #4303

syedbilal07 opened this issue Jan 21, 2022 · 17 comments
Labels
Bug thing that needs fixing Release 8.x work is associated with a specific npm 8 release

Comments

@syedbilal07
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

I have updated to the latest npm v8.3.2 and it is showing me an error while using the command "npm install". What is the solution?
Please see my previous issue: #4234 (same was present in v8.3.1). I don't want to switch my nodejs to LTS release

Expected Behavior

It should install the required package

Steps To Reproduce

  1. In this environment...
  2. With this config...
  3. Run '...'
  4. See error...
    I am using Windows 10 (Enterprise - Latest Version). I have the latest node and npm installed at the moment.

Environment

  • npm:
  • Node.js:
  • OS Name:
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

; "user" config from C:\Users\Bilal.npmrc

registry = "http://registry.npmjs.org/"

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\Users\Bilal
; HOME = C:\Users\Bilal
; Run npm config ls -l to show all defaults.

@syedbilal07 syedbilal07 added Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release labels Jan 21, 2022
@bonesoul
Copy link

+1

@vangop
Copy link

vangop commented Jan 24, 2022

literally unusable

@bonesoul
Copy link

same here,

@MrGriefs
Copy link

Seems to be a change with Node 17.4.0 causing this break, works fine on 17.3.1 otherwise. I personally blame Gabe

@ruyadorno
Copy link
Contributor

hi @syedbilal07 I'll close this issue in favor of keeping the conversation over at #4234, thanks!

@ruyadorno ruyadorno removed the Needs Triage needs review for next steps label Jan 27, 2022
@syedbilal07
Copy link
Author

Ok sure.

@lanseliuyiya
Copy link

+1

1 similar comment
@Codeway-js
Copy link

+1

@carepollo
Copy link

With npm 8.5.0 and node 16.14.2 on windows I have the same issue tryign to clone a repo

@mathiasmaerker
Copy link

for me every npm i-g .. command fails with the same error message on Win 10

@thecassion
Copy link

I have also the same problem

@HugoVersiani
Copy link

i have also the same problem

@lizaemran
Copy link

I also have same problem

@barunp
Copy link

barunp commented Sep 2, 2022

I am also facing same problem in npm version 8.5.5 and nvm -v

Running version 1.1.7.

@olignyf
Copy link

olignyf commented Nov 3, 2022

Just a heads up, this has been fixed in nvm 1.1.10.
Just install nvm 1.1.10 and you can use any newer node version without this error.
https://github.com/coreybutler/nvm-windows/releases

@talsunravi
Copy link

npm ERR! Unexpected token '.'

$ npm -v
8.19.2

$ nvm version
1.1.10

$ node -v
v16.18.1

$ npm i
npm ERR! Unexpected token '.'

@Tapudp
Copy link

Tapudp commented Aug 9, 2023

Why has this been closed?
I'm still facing this

(D:\work) =>  npm -v
8.6.0

(D:\work) =>  node -v
v18.0.0

I'm on windows 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

No branches or pull requests