npm

解决‘vue‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件的方法

為{幸葍}努か 提交于 2021-01-01 18:03:09
1、输入命令找到npm 的配置路径 2、查看C:\Users\XYXS\AppData\Roaming\npm路径下是否有vue.cmd 3、复制路径: 4、 1).右键单击计算机,选择属性,然后点击高级系统设置 (2).点击环境变量,在系统变量下,找到PATH,然后双击打开 (3).在变量值这一栏的后面,加上;C:\Program Files\nodejs\ 点击确定 (4).最后windows+R 重新打开 cmd.exe窗口,输入node -v就可以看到node版本号了 (5)如果Path里面要设置多个 变量值 ,以“;”分号分隔开就行了 来源: oschina 链接: https://my.oschina.net/u/4358563/blog/4873174

npm ERR! invalid json response body at http://registry.npmjs.org/ansi-escapes reason: Unexpected end of JSON input

三世轮回 提交于 2021-01-01 06:49:31
问题 I have nodejs and npm installed I tried running the command npm install -g create-react-app but it halts at the error below freduah@freduah:~$ npm install -g create-react-app npm WARN registry Unexpected warning for http://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to http://registry.npmjs.org/create-react-app failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org npm WARN registry Using stale data from http://registry.npmjs.org/ due to a request error during revalidation

npm ERR! invalid json response body at http://registry.npmjs.org/ansi-escapes reason: Unexpected end of JSON input

天大地大妈咪最大 提交于 2021-01-01 06:49:05
问题 I have nodejs and npm installed I tried running the command npm install -g create-react-app but it halts at the error below freduah@freduah:~$ npm install -g create-react-app npm WARN registry Unexpected warning for http://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to http://registry.npmjs.org/create-react-app failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org npm WARN registry Using stale data from http://registry.npmjs.org/ due to a request error during revalidation

npm ERR! code ELIFECYCLE (starting issue)

不羁岁月 提交于 2021-01-01 02:41:46
问题 thanks for reading this and helping with the issue. I am trying to run nodejs on Windows machine and start expo client after installing expo-cli. Initially it worked except that live refresh or any other refresh wouldn't work so I tried to delete, uninstall/reinstall nodejj again and now I can't start the thing at all. I've tried troubleshooting steps from here: npm ERR! code ELIFECYCLE but unfortunately they did not help at all... I don't know if there is a way to perform a fresh install as

《菜鸟教程》| Egret搭建WebSocket简易聊天室

☆樱花仙子☆ 提交于 2020-12-31 11:04:12
本文,我们通过Egret和Node.js实现一个在线聊天室的demo。主要包括,聊天,改用户名,查看其他用户在线状态的功能。大致流程为,用户访问网页,即进入聊天状态,成为新游客,通过底部的输入框,可以输入自己想说的话,点击发布,信息呈现给所有在聊天的人的页面。用户可以实时修改自己的昵称,用户离线上线都会实时广播给其他用户。 体验链接 http://7hds.com:8888/ 下图为最终制作完成的聊天面板 WebSocket服务器可以用其他语言编写,本文采用的方法建立在Node.js上 。 在Node.js中我们使用ws第三方模块来实现服务器业务逻辑的快速搭建,还需使用uuid模块生成随机id,你需要使用npm包管理器来安装ws、uuid模块。使用以下命令: npm install ws -g npm install uuid -g 安装完成之后,使用终端工具进入服务器目录,开始编写代码: // 引入ws模块 var WebSocket = require('ws' ); // 创建websocket服务,端口port为:**** var WebSocketServer = WebSocket.Server, wss = new WebSocketServer({port: 8180 }); // 引入uuid模块 var uuid = require('node-uuid' );

vue-CLI outputting very concerning error (security question)

允我心安 提交于 2020-12-31 06:43:30
问题 I'm building an application with Vue.js. Suddenly, vue-cli has begun outputting errors that have me concerned that perhaps one or more of my dependencies has something nefarious in it. When I run npm run serve (vue-cli serve), the command succeeds , but outputs several lines of error messages like the following: (node:366423) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/initrd.img' It also fails to stat /home/jordan/.steampath , /initrd.img.old , /vmlinuz

vue-CLI outputting very concerning error (security question)

♀尐吖头ヾ 提交于 2020-12-31 06:42:13
问题 I'm building an application with Vue.js. Suddenly, vue-cli has begun outputting errors that have me concerned that perhaps one or more of my dependencies has something nefarious in it. When I run npm run serve (vue-cli serve), the command succeeds , but outputs several lines of error messages like the following: (node:366423) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/initrd.img' It also fails to stat /home/jordan/.steampath , /initrd.img.old , /vmlinuz

npm install to get dependency with tag version

核能气质少年 提交于 2020-12-31 04:49:29
问题 TL;DR: My project has dependency of "dep": "snapshot" where 'snapshot' is a tag. Running npm install does not fetch new version of "dep". Full story: So just recently I started with a JS project, and... to make a long story short i setup my own private repo via a locally installed Nexus. Let's call my project myProj1 . I added the Nexus registry in my .npmrc like so: registry=http://nexus:8081/nexus/content/groups/npm-all/ All is fine, I try and release snapshot versions before i release any

Package-lock.json - requires vs dependencies

对着背影说爱祢 提交于 2020-12-30 04:55:59
问题 In package-lock.json in dependency object, I have both requires and dependencies fields, e.g "requires": { "@angular-devkit/core": "0.8.5", "rxjs": "6.2.2", "tree-kill": "1.2.0", "webpack-sources": "1.3.0" }, "dependencies": { "rxjs": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.2.tgz", "integrity": "sha512-0MI8+mkKAXZUF9vMrEoPnaoHkfzBPP4IGwUYRJhIRJF6/w3uByO1e91bEHn8zd43RdkTMKiooYKmwz7RH6zfOQ==", "dev": true, "requires": { "tslib": "1.9.3" } } } What is the

Package-lock.json - requires vs dependencies

為{幸葍}努か 提交于 2020-12-30 04:55:49
问题 In package-lock.json in dependency object, I have both requires and dependencies fields, e.g "requires": { "@angular-devkit/core": "0.8.5", "rxjs": "6.2.2", "tree-kill": "1.2.0", "webpack-sources": "1.3.0" }, "dependencies": { "rxjs": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.2.tgz", "integrity": "sha512-0MI8+mkKAXZUF9vMrEoPnaoHkfzBPP4IGwUYRJhIRJF6/w3uByO1e91bEHn8zd43RdkTMKiooYKmwz7RH6zfOQ==", "dev": true, "requires": { "tslib": "1.9.3" } } } What is the