InteXX
InteXX

Reputation: 6367

Can't uninstall a package

I'm getting this error text when attempting to uninstall tfx-cli:

C:\Users\Admin>npm uninstall tfx-cli
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\Admin\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Admin\package.json'
npm WARN Admin No description
npm WARN Admin No repository field.
npm WARN Admin No README data
npm WARN Admin No license field.

up to date in 0.14s

I'm trying to uninstall due to this issue, so I can attempt another reinstall.

The file C:\Users\Admin\package.json doesn't exist, but C:\Users\Admin\package-lock.json does. It contains a single line of text:

{ "lockfileVersion": 1 }

How to get past this?

Upvotes: 0

Views: 560

Answers (1)

Suraj Rao
Suraj Rao

Reputation: 29614

npm by default looks for the package in local folder. You need to use -g option if you want to install/uninstall globally.

npm uninstall -g tfx-cli

Upvotes: 1

Related Questions