2024年Web前端最全下载模块包及安装环境node,npm,vue,2024大厂前端社招面试题

本文介绍了2024年前端开发者面试中常见的JavaScript设计模式、函数概念以及HTTP基础知识。同时,详细讲解了如何在全局环境下安装和配置Node.js、NPM以及Vue.js,包括遇到的npm包安装问题及解决方案,如处理npm的版本不兼容问题。此外,还提到了大厂前端面试题和学习资源。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

常用的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 缓存及缓存代理?

  • 为什么产生代理缓存?

  • 源服务器的缓存控制

  • 客户端的缓存控制

  • 什么是跨域?浏览器如何拦截响应?如何解决?

    开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值