Tag: npm

windows nt错误和节点js代码中的elifecycle错误

我正在尝试解决一些我的朋友写的代码的问题。 他不能回答我的问题,所以我问你,如果我按下程序中的特定button,服务器将崩溃。 这是我得到的npmdebugging日志: `0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Programme\\nodejs\\\\node.exe', 1 verbose cli 'C:\\Programme\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'start' ] 2 info using npm@2.11.3 3 info using node@v0.12.7 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info prestart KTB@0.0.0 6 info start KTB@0.0.0 7 verbose unsafe-perm in lifecycle […]

如何使webpack dev服务器访问公开?

https://github.com/nttcom/SkyWay-MultiParty我testing了这个api在本地运行webpack dev服务器 这是成功,但我想访问其他电脑或智能手机 我能做什么? 我第一次看到webpack代码 的package.json { "name": "skyway-multiparty", "version": "1.0.4", "description": "SkyWay js library for multi party apps", "homepage": "https://github.com/nttcom/SkyWay-MultiParty", "repository": { "type": "git", "url": "git://github.com/nttcom/SkyWay-MultiParty.git" }, "main": "lib/index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "webpack-dev-server": "webpack-dev-server –host 172.19.1.200 –port 8081 –open –https –content-base ./" }, webpack.config.js const webpack […]

在现有项目中安装Angular

我意识到,这曾经是与ng init完成,但不再存在。 也可以从目录树上的一个层次运行ng new目标文件,并定位到现有项目的文件夹,但是这会覆盖package.json从而清除已经为自己放置的所有依赖项。 有没有什么办法可以完成像ng new的一样,但在一个已经存在的项目?

“需要升级”(ws包)带有节点的WebSockets

我想简单地使用与Node js的WebSockets。 我告诉你我的代码: 的index.html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>WebSockets</title> </head> <body> <script type="text/javascript"> const WebSocket = require('ws'); var sock = new WebSocket("ws://localhost:5001",{perMessageDeflate:false}); sock.onopen = function(event){ alert('Socket connected successfully'); setTimeout(function(){ sock.send("Hey !"); },1000); }; sock.onmessage = function(event){ console.log(event); }; </script> </body> </html> index.js var server = require('ws').Server; var s = new server({ port:5001}); 我安装了包“ws”来使用WebSockets。 […]

npm不会安装链接模块的依赖关系

我在moduleA中使用moduleB作为链接依赖。 moduleB依赖于moduleC。 模块B的package.json是这样的: { "name": "moduleB", "bin": { "moduleB-bin": "index.js" }, "dependencies": { "moduleC": "^1.0.0", } } 模块A的package.json是这样的: { "name": "moduleA", "scripts": { "run-moduleB": "moduleB-bin" }, "dependencies": { "moduleB": "file:../moduleB", } } 如果我然后从moduleA的目录运行npm install moduleB ,我最终得到一个如下的目录结构: ├── moduleA │ └── node_modules │ └── moduleB -> ../moduleB └── moduleB └── node_modules └── moduleC moduleC未安装在moduleA/node_modules 。 这与moduleB不是链接的依赖关系会发生什么不同。 […]

离子启动错误证书链中的自签名证书

有人可以帮我解决这个问题。 当我运行CMD中的这个命令(作为pipe理员) ionic start projectName blank 我遇到这个问题 C:\ionic start firstApp blank √ Creating directory .\firstApp – done! [INFO] Fetching app base (https://github.com/ionic-team/ionic2-app- base/archive/master.tar.gz) × Downloading – failed! Error: self signed certificate in certificate chain 我的离子信息: cli软件包: @ ionic / cli-utils:1.6.0 离子(离子CLI):3.6.0 系统: 节点:v8.2.1 操作系统:Windows 10 npm:5.3.0 其他信息: 这是我第一次使用离子

npm activedirectory获取objectGUID

我有一个Nodejs应用程序,我似乎无法得到一个实体唯一的ID这里是我正在使用的模块: https://www.npmjs.com/package/activedirectory 拉群体,我似乎无法得到以下属性: 的objectGUID 的objectSID 这里是片段 var ad = new ActiveDirectory(domainConfig); var query = 'CN=*'; ad.findGroups(query, function (err, result) { if (err) { console.log(err); log.error("No Groups found."); } log.info(result); }); 我错过了什么? 默认情况下,所有的属性应该返回 attributes – 要select和返回的属性(如果设置了这些属性,服务器将只返回这些属性)。 默认为空集,这意味着所有的属性。

在localhost:3000上启动npm后,控制台显示错误

在localhost:3000上单击npm start后,我在控制台日志中收到以下错误 不能GET / @angular度/平台浏览器dynamic 不能GET / @angular度/平台浏览器dynamic npm版本3.10.9节点版本v7.2.0 package.json如下 { "name": "angular-quickstart", "version": "1.0.0", "description": "QuickStart package.json from the documentation, supplemented with testing support", "scripts": { "build": "tsc -p src/", "build:watch": "tsc -p src/ -w", "build:e2e": "tsc -p e2e/", "serve": "lite-server -c=bs-config.json", "serve:e2e": "lite-server -c=bs-config.e2e.json", "prestart": "npm run build", "start": "concurrently \"npm run build:watch\" […]

NodeJs fs.watch / FSWatcher错误

你好我使用以下, Ubuntu 17.04 Node:v6.11.2 NPM:v3.10.10 在安装我的项目依赖关系时,我得到了安装fsevents的警告( 这个错误 ,我忽略了,我用Gulp来运行这个项目。 我得到以下错误, events.js:160 throw er; // Unhandled 'error' event ^ Error: watch /media/app/modules/services/auth/ ENOSPC at exports._errnoException (util.js:1020:11) at FSWatcher.start (fs.js:1443:19) at Object.fs.watch (fs.js:1470:11) at Gaze._watchDir (/media/node_modules/gaze/lib/gaze.js:289:30) at /media/node_modules/gaze/lib/gaze.js:358:10 at iterate (/media/node_modules/gaze/lib/helper.js:52:5) at /media/node_modules/gaze/lib/helper.js:61:11 at /media/node_modules/gaze/lib/gaze.js:420:5 at iterate (/media/node_modules/gaze/lib/helper.js:52:5) at /media/node_modules/gaze/lib/helper.js:61:11 at /media/node_modules/gaze/lib/gaze.js:420:5 at iterate (/media/node_modules/gaze/lib/helper.js:52:5) at /media/node_modules/gaze/lib/helper.js:61:11 at […]

节点SSH2连接到路由器

我正在创build一个应用程序,可以在我的工作中通过SSH进入路由器,并根据与WiFi的连接考虑学生。 我有login信息,可以打开一个terminal和SSH使用用户名和密码和运行命令来获取连接设备的列表。 当我用Node.js使用SSH进行设置时,我遇到了一个错误,无法运行任何命令,路由器也踢我的连接。 我假设这是当我尝试运行一个命令,但不能certificate这一点。 下面是我的代码和debugging日志。 任何帮助过滤通过这将不胜感激。 DEBUG: Local ident: 'SSH-2.0-ssh2js0.1.19' DEBUG: Client: Trying 192.168.0.24 on port 22 … DEBUG: Client: Connected DEBUG: Parser: IN_INIT DEBUG: Parser: IN_GREETING DEBUG: Parser: IN_HEADER DEBUG: Remote ident: 'SSH-2.0-dropbear_2013.59' DEBUG: Outgoing: Writing KEXINIT DEBUG: Parser: IN_PACKETBEFORE (expecting 8) DEBUG: Parser: IN_PACKET DEBUG: Parser: pktLen:220,padLen:10,remainLen:216 DEBUG: Parser: IN_PACKETDATA DEBUG: Parser: IN_PACKETDATAAFTER, […]