草庐IT

SECURITY_ERR

全部标签

node.js - 模块.js :338 throw err in node. js

我正在使用ubuntu,我正在尝试使用nodejs运行脚本,但出现此错误。/home/bebz/Documents/test#nodeserver.jsmodule.js:338throwerr;^Error:Cannotfindmodule'merge-descriptors'atFunction.Module._resolveFilename(module.js:336:15)atFunction.Module._load(module.js:278:25)atModule.require(module.js:365:17)atrequire(module.js:384:17)at

node.js - 为什么 npm list -g 会导致 npm ERR!遗漏错误?

npm使用npmlist-g后返回如下信息npmERR!missing:atom-package-manager@*,requiredbyundefined@undefinednpmERR!missing:opal-npm-wrapper@git://github.com/anthonny/opal-npm-wrapper.git#0.1.1,requiredbyasciidoctor.js@1.5.2npmERR!missing:xmlhttprequest@~1.6.0,requiredbyasciidoctor.js@1.5.2截图: 最佳答案

node.js - 如何修复此错误 TypeError [ERR_INVALID_CALLBACK] : Callback must be a function

我是nodejs的初学者。当我键入以下内容时,代码错误发生如下:TypeError[ERR_INVALID_CALLBACK]:Callbackmustbeafunctionvarfs=require('fs');fs.readFile('readMe.txt','utf8',function(err,data){fs.writeFile('writeMe.txt',data);}); 最佳答案 Fs.writeFile()根据文档here需要(文件,数据[,选项]和回调)参数,所以你的代码将是这样的:varfs=require('

node.js - 在 npm 包全局安装上获取 "npm ERR! code EPEERINVALID"

每当我安装任何全局包时,我都会收到此错误。Error:-onnpmpackagesglobalinstall例如:-robins@robins-H61MLV3:~$sudonpminstall-gjshint/usr/bin/jshint->/usr/lib/node_modules/jshint/bin/jshintnpmERR!Linux3.19.0-25-genericnpmERR!argv"node""/usr/local/bin/npm""install""-g""jshint"npmERR!nodev0.10.25npmERR!npmv2.13.2npmERR!codeEP

node.js - 为什么我在将我的 Electron 项目更新到最新版本后会看到 "Electron Security Warning"?

我从thisVuetify'sboilerplate创建了Electron-Vuejs-Vuetify项目我在控制台中看到了这个警告:ElectronSecurityWarningThisrendererprocesshasNode.jsintegrationenabledandattemptedtoloadremotecontent.Thisexposesusersofthisapptoseveresecurityrisks.Formoreinformationandhelp,consulthttps://electronjs.org/docs/tutorial/security问题

javascript - 如果服务器出现故障,如何捕获浏览器抛出的 ERR_CONNECTION_REFUSED?

我觉得这个问题很简单,但是我在官方Socket.iodocs中还没有找到答案.我的Socket.io服务器和客户端通信成功,当我关闭服务器时,客户端将尝试重新连接服务器,但失败。这显示在Chrome开发人员的控制台中:有什么方法可以在客户端Javscript中检测到此事件并以某种方式对其使用react?我想我会在页面上显示一个对话框,例如“对不起,服务器负载过重”等。 最佳答案 从Socket1.x开始,处理这个问题的正确方法是使用Manager给定套接字的对象。它会抛出一个connect_error事件,可以如下处理:socket

node.js - 弃用警告 : Buffer() is deprecated due to security and usability issues when I move my script to another server

脚本移动到其他服务器时出错。(node:15707)[DEP0005]DeprecationWarning:Buffer()isdeprecatedduetosecurityandusabilityissues.PleaseusetheBuffer.alloc(),Buffer.allocUnsafe(),orBuffer.from()methodsinstead.当前版本:Ubuntu16.04.4LTSNode-v10.9.0NPM-6.2.0以前的版本:Ubuntu14.04.3LTSNPM-3.10.10Node-v6.10.3exports.basicAuthenticati

node.js - Node "npm ERR! code SELF_SIGNED_CERT_IN_CHAIN"

我是nodejs和npm的新手。我正在尝试安装log4js,这是安装命令:npminstalllog4js我从Windows命令行运行它,在标记旋转一段时间后,我收到以下错误:npmERR!Windows_NT6.3.9600npmERR!argv"C:\\ProgramFiles\\nodejs\\\\node.exe""C:\\ProgramFiles\\nodejs\\node_modules\\npm\\bin\\npm-cli.js""install""log4js"npmERR!nodev0.12.0npmERR!npmv2.5.1npmERR!codeSELF_SIGNE

javascript - 错误 : npm ERR! 写入结束后

我在安装Cordova和Ionic时遇到问题。起初我不能,因为安装似乎已损坏,这导致我卸载了NodeJS-Cordova-Ionic。现在,我重新安装了NodeJS,没有问题,但是当谈到著名的行时:npminstall-gcordovaionic,我遇到了这个错误:npm错误!结束后写那么每次我尝试安装cordovaionic时,对于不同的包,我都会遇到同样的错误......这是我得到的错误:C:\Windows\System32>npminstall-gcordovaionicnpmERR!writeafterendnpmERR!Acompletelogofthisruncanbef

security - Node.js Express 框架安全问题

关闭。这个问题需要更多focused.它目前不接受答案。想要改进这个问题吗?更新问题,使其只关注一个问题editingthispost.关闭8年前。Improvethisquestion我正在寻找应该添加到Node/Express应用程序中的模块,以解决下面列出的一般安全问题:注入(inject)漏洞(JavaScript、SQL、Mongo、HTML)session固定和劫持跨站漏洞(脚本、请求伪造)集体作业在此处插入相关问题感谢您的帮助!---------我找到的一些资源:Excellenttalk(11/2012):http://lanyrd.com/2012/asfws/sxz