【Node】cnpm -v 没反应,光标一直闪动无响应

使用Nvm切换nodeJs高版本之后,使用npm install一闪而过 -location=global被用来代替--global,因为在npm 7.0.0版本之后,npm引入了一些新的全局安装机制。为了向后兼容,npm决定弃用--global参数,改用--location=global来指定全局安装的位置。这个命令,可以将指定的Node.js包安装到全局环境,使得该包在任何目录下都可以使用,而不仅限于某个项目。在过去,可以使用--global来指定全局安装,但现在已经过时了,应该使用--location=global来代替。没有任何提示,然后翻看文件目录, 阅读详情

运行脚手架项目常常需要npm install 安装依赖,但是npm的速度真的让人不敢恭维,所以我们通常安装淘宝镜像cnpm来加快依赖的安装速度。

但是我安装完cnpm后,发现cnpm 命令毫无反应, cnpm -v 也毫无反应 查不出来版本号

从上图可以看出来我刚安装的cnpm ,但是cnpm -v的命令却毫无反应,只有光标在一直闪动

网上查阅好多资料让删除 .npmrc 文件    但是依旧不好使,而且有很多 .npmrc文件,很容易造成误删

后来查阅各种资料发现一种极为有效的方法

解决办法

在cmd命令行工具里输入下面的代码

npm config set registry http://registry.cnpmjs.org

运行后,cnmp 命令就可以使用了

 

升级cnpm淘宝镜像为最新版本

npm install npm@latest -g cnpm --registry=http://registry.npm.taobao.org

使用:cnpm install

 

设置npm的registry为淘宝镜像(建议使用这种方式)

在开发react-native的时候,不要使用cnpm!cnpm安装的模块路径比较奇怪,packager不能正常识别

所以我们改变npm的镜像源地址为淘宝镜像源地址

npm config set registry "https://registry.npm.taobao.org"

使用:npm install     

用Python玩转LQR控制:3行核心代码实现倒立摆稳定控制(附Jupyter Notebook) 本文通过Python实战演示了如何使用LQR算法实现倒立摆的稳定控制。文章以直观方式解释LQR原理,提供从系统建模、核心代码求解到参数调优的完整流程,并附有可运行的Jupyter Notebook代码。重点介绍了如何利用SciPy库快速计算最优反馈增益,并通过仿真验证控制效果,为运动控制实践提供了即学即用的指南。 阅读详情

相关推荐

安装了淘宝镜像cnpm后使用cnpm -v命令显示不是内部命令的解决方法

安装镜像: npminstall -gcnpm--registry=https://registry.npm.taobao.org 如果安装成功之后使用cnpm -v显示不是内部命令的话,多半是环境变量的问题 去到框中的这目录下看是否有cnpm.cmd文件,如果有就把这个目录放进环境变量里面,没有就去这个目录的父级目录看一看,我的就是在父级目录才有cnpm.cmd文件。总之就是一定要用有cnpm.cmd文件的目录写进环境变量。 ...

ZWZW12的博客 5005

【算法】—前缀和与差分详解

前缀和指一个数组的某下标之前的所有数组元素的和(即数列的前n项求和),前缀和是一种重要的预处理,能够降低算法的时间复杂度,可以快速地求出某一段的和,对于处理区间之间的问题是往往十分高效相比较其他算法而言,前缀和更像是一种解题的技巧,一种优化方式输入一个长度为 n 的整数序列。接下来再输入 m 个询问,每个询问输入一对 l,r 对于每个询问,输出原序列中从第 l 个数到第 r 个数的和5 32 1 3 6 41 21 32 4123453610。

DAY I 的成长之路 6022

linux重启mysql

先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。1、直接使用“servicemysqldrestart”或“servicemysqlrestart”命令重启;方法一status;...

m0_67402236的博客 2万+

MT6768平台Sensor Bring Up全流程实战:从驱动添加到问题排查(附避坑指南)

本文详细介绍了联发科MT6768平台Sensor Bring Up的全流程实战指南,从驱动添加、硬件配置到问题排查,提供了全面的避坑建议。内容涵盖环境准备、驱动文件集成、硬件接口配置、编译系统适配以及常见问题解决方案,帮助开发者高效完成传感器集成与调试工作。

weixin_30374009的博客 416

【CSP-J/S】复赛注意事项 上机文件组织形式

每年/S 复赛都有很多同学因为一些小失误导致一年的努力付之东流。Tony老师整理了一些复赛容易踩坑的点,或许对你有帮助!

星卯教育-信奥教练tony 1万+

cnpm windows系统安装后查看版本cnpm -v报错Error: Cannot find module ‘node:util‘

在网上查了一些资料,有的说配置环境变量就可以,但经过配置后发现还是会报错。又查到说是由于cnpm和npm的版本不一致导致的,最后尝试成功解决!3、查看npm版本后可以知道npm是6.XX的版本,所以安装对应版本的cnpm,在终端输入。5、如果还是安装不成功、报错,可能是需要再配置环境变量。(2)高级系统设置->环境变量->系统变量->找到。1、先卸载掉之前安装的cnpm,在终端输入。所在的路径,复制这个路径,配到环境变量中。(3)新建,将第(1)步的路径粘贴进去。2、查看npm的版本,在终端输入。

DarlingYL的博客 3407

AD4030-24BBCZ详细资料 Analog Devices 模数转换器 - ADC 24-Bit, 2 MSPS, SAR ADC

AD4030-24BBCZ详细资料  Analog Devices 模数转换器 - ADC 24-Bit, 2 MSPS, SAR ADC

Chen_YYan的博客 794

解决vue环境搭建中cnpm -v 不是外部命令的问题

cnpm -v 不是外部命令的问题 之前安装npm的时候,配置过node_modules和node_cache。所以去nodejs的目录下找到cnpm的安装位置,找到cnpm命令脚本文件所在 在D:\Develop\nodejs\node_global下找到这个文件 然后把这个路径拷贝下来,去cmd里面粘贴,在此目录下执行命令cnpm -v 可以看到成功运行了,而之前直接输入cnpm -v ...

tiansheng_Lai的博客 1116

使用 Mid360 从零开始搭建实物机器人入门级导航系统 —— 基于 Fast_Lio 和 Move_Base

本文详细介绍了如何使用Mid360机器人从零开始搭建一个基于Fast_Lio和Move_Base的入门级导航系统。通过配置 ROS2、集成激光雷达、IMU、Fast_Lio、Move_Base 等模块,我们成功构建了一个能够实现自动导航的机器人系统。在实际开发中,随着需求的变化,你可以不断调整参数、优化路径规划算法、增加新的传感器等,逐步提升机器人的智能与功能。

小蜗牛的珍贵百宝箱 3565

运行时安全引擎RSE

该博客重点介绍了运行时安全引擎(Runtime Security Engine,简称 RSE)与应用处理器(Application Processor,简称 AP)之间的关系。 根据 ARM 的参考设计,RSE 是位于同一芯片(die)上的一个独立核心,与 AP 和系统控制处理器(System Control Processor,简称 SCP)并列存在。RSE 为整个系统提供基本的安全保障和运行时服务,例如:可信启动(trusted boot)、度量启动(measured boot)、平台认证(platf

AI-安全-功耗 1364

cnpm安装和使用

cnpm

Lynn 1999

YOLOv8改进 | 注意力篇 | 一文带你改进GAM、CBAM、CA、ECA等通道注意力机制和多头注意力机制

官方论文地址:官方论文地址点击此处即可跳转官方代码地址:官方代码地址点击此处即可跳转GAM旨在通过设计一种机制,减少信息损失并放大全局维度互动特征,从而解决传统注意力机制在通道和空间两个维度上保留信息不足的问题。GAM采用了顺序的通道-空间注意力机制,并对子模块进行了重新设计。具体来说,通道注意力子模块使用3D排列来跨三个维度保留信息,并通过一个两层的MLP增强跨维度的通道-空间依赖性。

Snu77的博客 4万+

cnpm命令没反应的解决方法

cnpm命令没反应 1、莫名其妙就不能用了,cnpm -v、cnpm install等等cnpm命令执行了都只是跳到下一行就毫无反应。试了npm是没问题的 2、上百度搜了下列三种方式尝试都还是不行 设置环境变量。没用 删除C盘用户目录下的.npmrc文件。也没有用 执行npm config set registry http://registry.cnpmjs.org。还是没用 3、就试着卸载cnpm重新安装试试,果然可以了 卸载 npm uninstall -g cnpm --registry=ht

存于心,而非流于形。 3090

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

npm和cnpm(windows)安装步骤

一、什么是npm和cnpm npm(node package manager):nodejs的包管理器,用于node插件管理(包括安装、卸载、管理依赖等)cnpm:因为npm安装插件是从国外服务器下载,受网络的影响比较大,可能会出现异常,如果npm的服务器在中国就好了,所以我们乐于分享的淘宝团队干了这事。来自官网:“这是一个完整 npmjs.org 镜像,你可以用此代替官方版本(只读),同步频...............

16万+

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

cnpm 安装成功,cnpm i 无反应,光标一直闪烁

有效解决方案: 重新安装cnpm 1.卸载原有旧的版本: npm uninstall -g cnpm --registry=https://registry.npm.taobao.org 2.注册模块镜像: npm set registry https://registry.npm.taobao.org 3.node-gyp 编译依赖的 node 源码镜像 npm set disturl https://npm.taobao.org/dist 4.清空缓存 npm cache.

飞扬_柳絮的专栏 590

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

解决只有在以管理员身份运行命令提示符的情况下,才能运行语句cnpm -v

通常情况下,全局安装的npm包会被安装在Node.js的安装目录下的node_modules文件夹(这个node_modules文件夹是我们手动创建的,并且手动指定的)中。当以管理员身份运行命令提示符时,系统会使用管理员的环境变量,其中包含了 cnpm 的安装路径。但是当你直接打开命令提示符时,系统使用的可能是普通用户的环境变量,其中没有包含 cnpm 的路径。可以手动将 cnpm 的安装路径添加到系统的环境变量中,这样无论以何种方式打开命令提示符都可以正常使用 cnpm。

qq_44813187的博客 607

npm install 一直加载闪烁,如何解决?

方法1:修改请求源 修改源: npm config set registry https://registry.npm.taobao.org 修改后可以通过这个进行测试 npm config get registry

皮皮虾的博客 1788

解决windows下安装cnpm后,cnmp不是内部命令的问题

1、安装cnpm npm install -g cnpm -registry=https://registry.npm.taobao.org 2、验证cnpm 用下面命令检查cnpm安装,发现不可用,提示cnpm不是内部命令。 cnpm -v 3、解决方案 将cnpm所在目录,如下图所示,配置在系统环境变量path下​​​​​。 4、再次验证 重新打开新的cmd命令窗口进行验证。 cnpm -v 搞定!!! ...

春风化雨 1831

关于输入cnpm -v不是内部命令或者执行cnpm等脚本错误

解决: 1、在系统中搜索框 输入 Windos PowerShell 2、点击“管理员身份运行” 3、输入“ set-ExecutionPolicy RemoteSigned”回车(手动输入不要复制) 4、根据提示,输入A,回车 5、再次回到cnpm -v执行成功。 作者:Find_Your_Way 链接:https://www.jianshu.com/p/3cbaeb5076eb 来源:简书 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 ...

qq_37967853的博客 1202

【cnpm -v报错,已解决】node.js安装过程中cnpm -v报错

node.js安装过程中cnpm -v报错,重启管理员cmd后解决

weixin_52040458的博客 756

npm问题:在命令行或者终端中输入npm -v或者cnpm -v没反应

在命令行输入npm -v没反应,或者比较慢才返回;输入cnpm -v没反应(提前下载过cnpm了的)。

xiongpursuit88的博客 2093

cnpm命令没反应

cnpm命令没反应 1、莫名其妙就不能用了 ,cnpm -v、cnpm install等等cnpm命令执行了都只是跳到下一行就毫无反应。试了npm是没问题的 2、上百度搜了下列三种方式尝试都还是不行 设置环境变量。没用 删除C盘用户目录下的.npmrc文件。也没有用 执行npm config set registry http://registry.cnpmjs.org。还是没用 3、就试着卸载cnpm重新安装试试,果然可以了 卸载 npm uninstall -g cnpm --registry=http

-----------------专业搬砖 836

运行 cnpm -v报错处理

解决办法: 1.打开电脑自带的搜索框输入:PowerShell 后出来页面 2.

weixin_45741366的博客 1024

npm无反应的问题&npm常用命令

RT: windows安装完nodejs后做了相关环境变量配置后,cmd输入npm命令无反应,就光标一直闪,百度了半天终于找到解决办法 解决方法:C:\Users\Administrator(或你的账号)下的‘.npmrc’文件(不仅仅是npm文件夹里面的这个文件),将prefix=‘...‘去掉,或者干脆删除这个文件! npm常用命令: npm root 查看当前包的安装路径n...

weixin_30783629的博客 549

安装完node.js,在命令行输入npm -v无反应的解决办法

安装完成Node.js后,在命令行输入node -v,顺利提示版本号 再输入npm -v 始终是光标在闪动 删除 C:\Users\{账户}\下的.npmrc文件后 再输入npm -v,顺利提示版本号。 问题解决 转载于:https://www.cnblogs.com/sx00xs/p/9081317.html...

weixin_30670925的博客 1304
上一篇: 【JS】数组/对象数组删除其中某一项
下一篇: 【VUE】vue路由跳转Uncaught (in promise) undefined 需要点两次才能跳转成功
NAMECZ
博客等级 码龄9年 175粉丝 64原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值