How to restore/reset npm configuration to default values?

前端 未结 6 863
孤街浪徒
孤街浪徒 2020-12-04 09:32

I have played with npm set and npm config set for several times, now I want to reset to default values (a kind of factory reset).

D

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-04 09:49

    For what it's worth, you can reset to default the value of a config entry with npm config delete (or npm config rm , but the usage of npm config rm is not mentioned in npm help config).

    Example:

    # set registry value
    npm config set registry "https://skimdb.npmjs.com/registry"
    # revert change back to default
    npm config delete registry
    

提交回复
热议问题