常用的JavaScript设计模式
-
单体模式
-
工厂模式
-
例模式
函数
-
函数的定义
-
局部变量和全局变量
-
返回值
-
匿名函数
-
自运行函数
-
闭包
开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】
全局下npm新包
注意,此时,默认的模块E:\Program Files (x86)\nodejs\node_modules\
目录将会改变为目录E:\Program Files (x86)\nodejs\node_global\node_modules
如果直接运行npm install等命令会报错的。
增加环境变量NODE_PATH 内容是:E:\Program Files (x86)\nodejs\node_global\node_modules
安装vue
vue脚本在自定义的global目录下,需添加到环境变量
对path环境变量添加E:\Program Files (x86)\nodejs;E:\Program Files (x86)\nodejs\node_global
安装vue脚手架 vue 2.9.6
npm install vue -g
npm install vue-cli -g
vue -V
参考学习:https://blog.csdn.net/yt_php/article/details/90105880
https://www.cnblogs.com/goldlong/p/8027997.html
$ npm install
yorkie@2.0.0 install D:\0 work\source\华夏娱乐系统\node_modules\yorkie
node bin/install.js
▒ܾ▒▒▒▒ʡ▒
npm WARN notsup Unsupported engine for pkcs7@1.0.2: wanted: {“npm”:“1.4.6",“node”:"0.10”} (current: {" node":“12.13.1”,“npm”:“6.12.1”})
npm WARN notsup Not compatible with your version of node/npm: pkcs7@1.0.2
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {“os”:“dar win”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yorkie@2.0.0 install: node bin/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yorkie@2.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2019-12-06T01_24_52_151Z-debug.log
解:Unsupported platform for fsevents@1.2.7: wanted {“os”:“dar win”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
原因: fsevent是mac osx系统的,在win或者Linux下使用了 所以会有警告,忽略就好了,意思就是你已经安装成功了,之后npm run dev即可
NPM依赖包版本号~和^的区别
会匹配最近的小版本依赖包,比如1.2.3会匹配所有1.2.x版本,但是不包括1.3.0
会匹配最新的大版本依赖包,比如1.2.3会匹配所有1.x.x的包,包括1.3.0,但是不包括2.0.0
控制面板先去卸载之前的
下载node 0.10
npm升级到指定版本
$ npm install -g npm@1.4.6
npm http GET https://registry.npm.taobao.org/npm/1.4.6
npm http 200 https://registry.npm.taobao.org/npm/1.4.6
npm http GET https://registry.npm.taobao.org/npm/download/npm-1.4.6.tgz
npm http 200 https://registry.npm.taobao.org/npm/download/npm-1.4.6.tgz
npm WARN package.json github-url-from-git@1.1.1 No repository field.
npm WARN package.json vue-cube@0.1.0 No repository field.
C:\Users\Administrator\AppData\Roaming\npm\npm -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
npm WARN package.json ctype@0.5.2 No repository field.
npm WARN package.json assert-plus@0.1.2 No repository field.
npm WARN package.json path-is-inside@1.0.2 No readme data.
npm WARN package.json sorted-object@2.0.1 No readme data.
npmnpm@1.4.6 C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm
WARN unmet dependency C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\cross-spawn requires lru-cache@ ‘^2.5.0’ but will load
npm WARN unmet dependency C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\lru-cache,
npm WARN unmet dependency which is version 2.7.3
npm WARN unmet dependency C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm-request requires urllib@ ‘^2.8.0’ but will load
npm WARN unmet dependency C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\urllib,
npm WARN unmet dependency which is version 2.34.1
npm WARN unmet dependency C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall requires agentkee palive@‘^3.1.0’ but will load
npm WARN unmet dependency C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\agentkeepalive,
npm WARN unmet dependency which is version 3.5.2
notsup Not compatible with your operating system or architecture: n@6.1.3
npm install
各种报错,宝宝要受不了了
我要搞一套能用的
先到控制面板把node卸载
点进去文件发现 C:\Users\Administrator\AppData\Roaming\npm\node_modules@vue 为空
没有vue我一直安装vue-cli
。。脑子瓦特了
HTTP
-
HTTP 报文结构是怎样的?
-
HTTP有哪些请求方法?
-
GET 和 POST 有什么区别?
-
如何理解 URI?
-
如何理解 HTTP 状态码?
-
简要概括一下 HTTP 的特点?HTTP 有哪些缺点?
-
对 Accept 系列字段了解多少?
-
对于定长和不定长的数据,HTTP 是怎么传输的?
-
HTTP 如何处理大文件的传输?
-
HTTP 中如何处理表单数据的提交?
-
HTTP1.1 如何解决 HTTP 的队头阻塞问题?
-
对 Cookie 了解多少?
-
如何理解 HTTP 代理?
-
如何理解 HTTP 缓存及缓存代理?
-
为什么产生代理缓存?
-
源服务器的缓存控制
-
客户端的缓存控制
-
什么是跨域?浏览器如何拦截响应?如何解决?