Giter Club home page Giter Club logo

Comments (4)

chaegumi avatar chaegumi commented on August 31, 2024

把我的npm命令给弄没了,其它的命令正常

from smart-npm.

qiu8310 avatar qiu8310 commented on August 31, 2024

是的,安装 smart-npm 后会替换原来的 npm,这说明你没安装成功,但你反馈的信息太少了,我无法确定你问题出在什么地方。

如果你想快速恢复你原来的 npm,你重新安装下 node 就好了。

如果你确实想使用 smart-npm,可以回答下这几个问题,我帮你定位原因:

  1. 你安装的是哪个版本的 smart-npm, 1.x.x 还是 2.x.x
  2. 安装过程中有没有报什么错误,把错误信息反馈下(估计也找不到了)

另外,说下原理,这样你自己也可以方便的恢复 npm:
安装 npm 后会在安装的文件下生成一个 npm.cmd 文件,而你安装 smart-npm 时,会先将你的 npm.cmd 重命名成 _npm-original.cmd 文件,然后生成一个新的 npm.cmd。

出现你说的那个问题是新的 npm.cmd 没有生成,但旧的 npm.cmd 被替换成了 _npm-original.cmd 文件,所以你只要找到 npm.cmd 的安装目录,将里面的 _npm-original.cmd 替换成 npm.cmd 即可

from smart-npm.

chaegumi avatar chaegumi commented on August 31, 2024

我使用npm install --global smart-npm --registry=https://registry.npm.taobao.org/ 这条命令安装的,安装过程中是有出错(大致是说找不到命令),估计也是安装过程中npm给弄没了,所以后续的一些东西就报npm错误了。没有你说的_npm-original.cmd这个文件。后边我是手动下载npm包,然后替换到环境变量目录中,就可以用了。

from smart-npm.

qiu8310 avatar qiu8310 commented on August 31, 2024

那算了,其实我自己以前安装也出现过问题,当时主要是目录权限问题。

那我还是发个新版本,不再替换原来的 npm,安装后自己手动替换吧

from smart-npm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.