Fastdfsmysql重启后密码错误报错,怎么解决

nodejs中使用jquery出现“jQuery requires a window with a document”错误的解决方案
nodejs中使用jquery出现“jQuery requires a window with a document”错误的解决方案
发布时间: 3:10:54
编辑:www.fx114.net
本篇文章主要介绍了"nodejs中使用jquery出现“jQuery requires a window with a document”错误的解决方案",主要涉及到nodejs中使用jquery出现“jQuery requires a window with a document”错误的解决方案方面的内容,对于nodejs中使用jquery出现“jQuery requires a window with a document”错误的解决方案感兴趣的同学可以参考一下。
jquery也是可以在服务端使用的,使用npm安装jquery模块即可:
$npm install -g jquery
但是实际使用时发现报了这么一个错误:jQuery requires a window with a document。
原因是默认安装jquery时,版本是最新版2.1.0,这个版本没有包括jsdom,需要额外安装一个jsdom,然后这么使用:
var jsdom = require(&jsdom&);&
$ = require(&jquery&)(jsdom.jsdom().createWindow());&
也可以简单地将jquery卸载掉,安装一个低版本的,如下:
$npm install -g
这样使用起来就更加简单:
var $ = require(&jquery&);
var dom = $(html);
dom.find(&...&)&....
版权声明:本文为博主原创文章,未经博主允许不得转载。
一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家社会集体的和公民的合法权益,不得利用本站制作、复制和传播不法有害信息!
二、互相尊重,对自己的言论和行为负责。
本文标题:
本页链接:22:13 提问
用npm安装package.json时出现错误
我是在win8 64bit上面操作,本来安装的nodejs是64位的,
npm install时一直出现错误,上网查后有说要安装32位的,而且需要安装vs,
于是我卸载64的node又安装32的node,又安装vs2012,
然后又npm install
出现如下异常:
npm WARN optional dep failed, continuing fsevents@0.3.8
& spawn-sync@1.0.13 postinstall E:\project2\shijuan\node_modules\node-sass\node_modules\sas
modules\spawn-sync
& node postinstall
& node-sass@3.2.0 install E:\project2\shijuan\node_modules\node-sass
& node scripts/install.js
Binary downloaded and installed at E:\project2\shijuan\node_modules\node-sass\vendor\win32-
& node-sass@3.2.0 postinstall E:\project2\shijuan\node_modules\node-sass
& node scripts/build.js
` E:\project2\shijuan\node_modules\node-sass\vendor\win32-ia32-14\binding.node ` exists.
testing binary.
B exiting.
& bufferutil@1.1.0 install E:\project2\shijuan\node_modules\webpack-dev-server\node_modules
& node-gyp rebuild
(venv) Think@RESEARCH E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\sock
& if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
bufferutil.cc
正在创建库 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.io\
.expb 和对象 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.io\n
正在生成代码
已完成代码的生成
bufferutil.vcxproj -& E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\so
se\\bufferutil.node
& utf-8-validate@1.1.0 install E:\project2\shijuan\node_modules\webpack-dev-server\node_mod
f-8-validate
& node-gyp rebuild
(venv) Think@RESEARCH E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\sock
& if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
validation.cc
正在创建库 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.io-
Release\validation.lib 和对象 E:\project2\shijuan\node_modules\webpack-dev-server\node_mo
-8-validate\build\Release\validation.exp
正在生成代码
已完成代码的生成
validation.vcxproj -& E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\so
lidate\build\Release\\validation.node
& utf-8-validate@1.1.0 install E:\project2\shijuan\node_modules\webpack-dev-server\node_mod
& node-gyp rebuild
(venv) Think@RESEARCH E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\sock
& if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
validation.cc
正在创建库 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.io\
tion.lib 和对象 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.i
lidation.exp
正在生成代码
已完成代码的生成
validation.vcxproj -& E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\so
elease\\validation.node
& bufferutil@1.1.0 install E:\project2\shijuan\node_modules\webpack-dev-server\node_modules
& node-gyp rebuild
(venv) Think@RESEARCH E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\sock
& if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
bufferutil.cc
正在创建库 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.io-
ase\bufferutil.lib 和对象 E:\project2\shijuan\node_modules\webpack-dev-server\node_module
til\build\Release\bufferutil.exp
正在生成代码
已完成代码的生成
bufferutil.vcxproj -& E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\so
il\build\Release\\bufferutil.node
vinyl-named@1.1.0 node_modules\vinyl-named
└── through@2.3.8
manifest-revision-webpack-plugin@0.0.5 node_modules\manifest-revision-webpack-plugin
└── walk@2.3.9 (foreachasync@3.0.0)
coffee-script@1.9.3 node_modules\coffee-script
superagent@1.3.0 node_modules\superagent
├── extend@1.2.1
├── methods@1.0.1
├── cookiejar@2.0.1
├── component-emitter@1.1.2
├── reduce-component@1.0.1
├── mime@1.3.4
├── qs@2.3.3
├── debug@2.2.0 (ms@0.7.1)
├── readable-stream@1.0.27-1 (inherits@2.0.1, isarray@0.0.1, string_decoder@0.10.31, core-u
├── formidable@1.0.14
└── form-data@0.2.0 (async@0.9.2, combined-stream@0.0.7, mime-types@2.0.14)
其实看上去也成功了很多,但是前面那几个异常怎么解决呢?谢谢各位
package.json如下
"repository": {
"type": "git",
"license": "MIT",
"description": "Project Shijuan",
"scripts": {
"start": "node_modules/.bin/webpack-dev-server --config conf/webpack.config.js --progress --colors --port 5001 --content-base build/public",
"build": "node_modules/.bin/webpack --config conf/webpack.config.js --progress --profile --colors"
"dependencies": {
"amazeui": "^2.4.2",
"babel-core": "^5.4.7",
"babel-loader": "^5.1.3",
"coffee-loader": "^0.7.2",
"coffee-script": "^1.9.3",
"css-loader": "^0.15.6",
"echarts": "^2.2.7-beta7",
"extract-text-webpack-plugin": "^0.8.1",
"file-loader": "^0.8.4",
"html-loader": "^0.3.0",
"jquery": "^2.1.4",
"manifest-revision-webpack-plugin": "^0.0.5",
"node-sass": "^3.2.0",
"postcss-loader": "^0.5.1",
"sass-loader": "^2.0.0",
"style-loader": "^0.12.3",
"superagent": "^1.3.0",
"url-loader": "^0.5.6",
"vinyl-named": "^1.1.0",
"vue": "^0.12.10",
"vue-loader": "^2.1.1",
"vue-validator": "^1.4.0",
"webpack": "^1.10.0",
"webpack-dev-server": "^1.9.0",
"zrender": "ecomfe/zrender"
按赞数排序
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
--- 这是一些提示建议等,没看到你说的具体问题是什么
我npm install也出现也在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
请问你最后怎么解决的啊
其他相似问题采用npm install jquery 无法安装。 - CNode技术社区
1.cmd 已用管理员账号运行
2.win7操作系统 64位
3.提示如下:
C:\Program Files\nodejs&npm install jquery
npm http GET
npm http 304
npm http GET
npm http GET
npm http GET
npm http GET
npm http GET
npm http GET
npm http 304
npm http 304
npm http 304
npm http 304
npm http 304
npm http 304
npm http GET
npm http GET
npm http GET
npm http 304
contextify.1.6 install C:\Program Files\nodejs\node_modules\jquery\node_modu
les\contextify
node-gyp rebuild
C:\Program Files\nodejs\node_modules\jquery\node_modules\contextify&node “C:\Pro
gram Files\nodejs\node_modules\npm\bin\node-gyp-bin\…\node_modules\node-gyp
\bin\node-gyp.js” rebuild
npm http 304
npm http 304
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform
.Targets(23,7): error MSB8007: 项目“contextify.vcxproj”的平台无效。平台为“x64
”。您会看到此消息的可能原
因是,您尝试在没有解决方案文件的情况下生成项目,并且为此项目指定了并不存在的非默
认平台。 [C:\Program Files\nodejs\node_modu
les\jquery\node_modules\contextify\build\contextify.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: c:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack
at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack
at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack
at Process.ChildProcess._handle.onexit (child_process.js:789:
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command “node” “C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js” &rebuild&
gyp ERR! cwd C:\Program Files\nodejs\node_modules\jquery\node_modules\contextify
gyp ERR! node -v v0.10.18
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
C:\Program Files\nodejs&
这个包是需要编译的
你要有编译环境
在win下要有vs2005以上的版本
vs2010 我已安装了.
CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。
服务器赞助商为
,存储赞助商为
,由提供应用性能服务。
新手搭建 Node.js 服务器,推荐使用无需备案的NodeJs安装npm包一直失败怎么办-Java基础-Jsp教程-壹聚教程网NodeJs安装npm包一直失败怎么办
NodeJs安装npm包是很多用户会常遇到的,安装有很大的作用。今天文章就给大家来解答NodeJs安装npm包一直失败的问题,怎么解决NodeJs安装npm包一直失败呢?下面我们具体来看看。
最近在学React,在gitHub上下载一个项目下来,安装node.js后发现用npm install就一直报错,不知道怎么解决,查了很多资料 都没有用。在windows下 cmd到命令窗口 (最好是管理员的身份运行),结果就如下图01才开始学 不清楚什么错误,感觉和npm无关,查资料说是更改npm的安装源可以使用npm config list 查看当前配置的状况,说可能是某些包被国内墙了 需要操作npm config set strict-sslfalse&&&&&&//关闭npm的https&npm config set registry&http://registry.npmjs.org/&&&&//重新设置npm的获取地址或者直接编辑c盘下的.npmrc文件,将registry的值修改为:registry = http://registry.npmjs.org/但是发现都没有什么用再者,说是用淘宝镜像 ,我也试了 ,没什么用&npm config set registry https://registry.npm.taobao.org最后 终于找到了用代理 是代理的问题,直接npm config set proxy http://address:8080&&&& 注意这里的address我开始不知道是什么地址 就直接写的本电脑的IP地址 结果就可以了主要是参考/questions//npm-err-network-getaddrinfo-enotfound另外,清除npm的代理命令如下:&
&代码如下复制代码
npm configdeletehttp-proxynpm configdeletehttps-proxy&以上只代表个人的情况。以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助没有了
上一页:没有了 &&&&&下一页:相关内容

我要回帖

更多关于 小米6重启后密码错误 的文章

 

随机推荐