前端搭建环境

搭建前端环境和后端环境搭建 前后端环境搭建 阅读详情

nvm

  • nvm-windows

    Download the latest installer

  • mac

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
    
    wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
    
    export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
    
配置

打开setting.txt在后面添加这两行代码

node_mirror: https://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/
nvm 常用命令
  • nvm install stable ## 安装最新稳定版 node,当前是
  • nvm install <version> ## 安装指定版本,可模糊安装,如:安装v4.4.0,既可nvm install v4.4.0,又可nvm install 4.4
  • nvm uninstall <version> ## 删除已安装的指定版本,语法与install类似
  • nvm use <version> ## 切换使用指定的版本node
  • nvm ls ## 列出所有安装的版本
  • nvm ls-remote ## 列出所有远程服务器的版本(官方node version list)
  • nvm current ## 显示当前的版本
  • nvm alias <name> <version> ## 给不同的版本号添加别名
  • nvm unalias <name> ## 删除已定义的别名
  • nvm reinstall-packages <version> ## 在当前版本 node 环境下,重新全局安装指定版本号的 npm 包

nrm

npm install -g nrm
报错1
nrm : 无法加载文件 C:\Program Files\nodejs\nrm.ps1

搜索》powershell》以管理员身份运行

set-ExecutionPolicy RemoteSigned

# 询问输入
y
报错2
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);

找到nvm文件夹安装位置,打开cli.js 第17行修改成

// const NRMRC = path.join(process.env.HOME, '.nrmrc');
const NRMRC = path.join(process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'], '.nrmrc');
常用命令
  • nrm add <nrm name> <nrm url>添加源
  • nrm ls 展现所有源,带*是当前正在使用的源
  • nrm use <nrm name> 切换使用的源
  • nrm del <nrm name> 删除源

git

VSCode

下载地址

插件
  • Chinese (Simplified) Language Pack for Visual Studio Code

    VS Code 的中文(简体)语言包

  • Auto Close Tag

    自动关闭标签

  • Auto Rename Tag

    自动重命名标签

  • Bracket Pair Colorizer 2

    不同层级括号显示不同颜色

  • Code Runner

    运行code

  • Document This

    注释行

  • egg-jump-definition

    egg跳转到方法定义

  • eggjs

    eggjs支持

  • ESLint

    代码格式检测

  • GitLens — Git supercharged

    查看git更改,显示代码编辑者,提交时间,提交信息等

  • Git History

    git历史线等

  • indent-rainbow

    缩进的颜色区别

  • language-stylus

    对stylus支持

  • minapp

    微信小程序标签、属性的智能补全

  • wechat-snippet

    微信小程序代码辅助,代码片段自动完成

  • Path Intellisense

    路径提示

  • Vetur

    vue开发支持

node-sass

直接用yarn方法安装

yarn add node-sass

不使用淘宝镜像,使用原来地址安装

https://registry.npmjs.org/

hosts

C:\Windows\System32\drivers\etc\hosts

没有hosts文件
  • 查看》选项》隐藏受保护的操作系统文件

    去掉“隐藏受保护的操作系统文件”前面的勾,然后确定,刷新一下

  • 按照上面还是不行 ,开大

    搜索》命令提示符》以管理员身份运行

    for /f %P in ('dir %windir%\WinSxS\hosts /b /s') do copy %P %windir%\System32\drivers\etc & echo %P & Notepad %P
    

    回车

仓库

使用ssh克隆仓库
fatal: Could not read from remote repository. Please make sure you have the correct access rights
  • 情况一,没有配置ssh或者配置错误
  • 情况二,仓库不支持ssh
【前端开发环境安装、配置、项目搭建全教程】 前端开发环境安装、配置、项目搭建全教程 阅读详情

相关推荐

UE5新手必看:3种UI定位方法实战(含蓝图配置截图)

本文为UE5新手详细解析了三种核心UI定位方法:屏幕空间、场景空间和世界空间。通过实战蓝图配置与控件操作,指导开发者如何根据HUD、角色血条、3D物体标记等不同应用场景,正确选择并配置UI的定位方式,以实现清晰的信息传递与沉浸式体验。

weixin_29018815的博客 473

Mac 上安装nvm 包管理器

在Mac 中安装nvm 包管理器

Web-BUG记录坎坷路 703

nvm路径管理:PATH环境变量的动态修改和恢复

你是否曾在开发过程中遇到过Node.js版本冲突?是否因为全局安装的npm包路径混乱而头疼?作为开发者,我们经常需要在不同项目间切换,而每个项目可能依赖不同版本的Node.js和npm包。手动管理这些版本不仅繁琐,还容易导致环境变量(尤其是PATH)变得混乱不堪。 nvm(Node Version Manager)作为一款轻量级的Node.js版本管理工具,其核心功能之一就是通过动态修改和恢复P...

gitblog_00579的博客 1271

Altera Quartus II FPGA固件烧录全攻略:从SOF到JIC的完整流程(附EPCQ128配置技巧)

本文详细介绍了使用Altera Quartus II工具链将FPGA固件从SOF文件转换为JIC文件并烧录到EPCQ128 Flash芯片的完整流程。内容涵盖环境配置、文件转换步骤、EPCQ128专用配置技巧以及常见问题解决方案,帮助工程师实现FPGA固件的flash固化,确保设计可靠运行。

weixin_30275415的博客 203

别再只会插卡了!用示波器实测SIM卡上电时序与通信波形(附故障排查)

本文深入解析了SIM卡通信的电气信号与时序规则,通过示波器实测波形揭示SIM卡上电时序与通信协议的关键细节。从VCC、CLK、RST、DATA四路信号的协同工作,到ATR(Answer to Reset)的解析,再到常见故障的波形诊断与排查方法,为硬件工程师提供了实用的调试指南。文章还分享了高级调试技巧与现代化工具链搭建建议,帮助提升物联网设备SIM卡通信的可靠性与效率。

weixin_42567279的博客 325

Nodejs 安装与介绍

看懂 nodejs 和 js 区别,了解 nvm,并初步了解后端

John是橘红的博客 495

微信小程序、H5微信公众号网页JSAPI:解决报错requestMerchantTransfer:fail:internal error(使用wx.requestMerchantTransfer错误)

如何解决requestMerchantTransfer:fail:internal error,微信小程序wx.requestMerchantTransfer报错,微信公众号H5网页使用jssdk调用wx.requestMerchantTransfer报错,JSAPI调起用户确认收款报错errMsg:“requestMerchantTransfer:fail:internal error“,微信小程序/H5 调起确认收款界面,JSAPI调起用户确认收款,微信公众号(H5),用户发起提现,商家转账给用户,用户

✅ 精选推荐文章 4963

node.js前端环境搭建(Linux系统下nvm、npm、pm2安装)

一、Linux下安装nvm 1、git地址:https://github.com/nvm-sh/nvm 2、安装方法一:使用以下cURL或Wget命令: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash wget -qO- https://raw.githubuserconte...

lichao920926的博客 768

如何让C++程序生成dump文件?生成dump文件的方式有哪些?如何使用Windbg分析dump文件?

本文详细介绍了如何让C++程序生成dump文件、生成dump文件的多种方式以及如何使用Windbg分析dump文件,并给出了对应的实战分析案例,有一定的实战参考价值。

dvlinker的技术专栏 5万+

别再用Selenium被秒封了!2026最新反爬全突破+动态渲染实战(通过率99%)

做爬虫的同学,肯定都有过这样的经历:遇到一个纯前端渲染的网站,Requests抓包只能拿到一堆空的div标签,所有数据都是JS动态生成的。这时候你想到了Selenium,结果刚打开浏览器,网站直接跳出来一个"检测到机器人访问"的页面,或者直接返回403。我之前做一个跨境电商的爬虫项目,就踩了这个大坑。一开始用默认的Selenium ChromeDriver,10次请求有9次被封,通过率不到10%。

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 1383

Linux系统中安装 nvm 的详细步骤

在 Ubuntu 22.04.4 LTS 系统中安装 Node.js 版本管理器 nvm 的操作流程。通过执行curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash命令,成功从 Git 仓库下载 nvm 到/root/.nvm目录,并自动完成克隆、解压和清理等操作。安装过程中,脚本会将 nvm 的相关配置信息追加到/root/.bashrc文件,包括设置NVM_DIR环境变量、加载nvm.sh脚本以及启用

冲冲冲 696

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

前端环境搭建

前端环境搭建一、node.js安装1、windows安装node.js2、Mac上安装node.js先安装nvm 一、node.js安装 1、windows安装node.js (1) 百度搜索node.js进入node.js官网进行下载安装,一步步的点击next就可以安装完成。 (2)测试是否按照完成:在键盘按下【win+R】键,输入cmd,然后回车,打开cmd窗口 (3)在cmd窗口输入以下命令,如果显示版本号则表示按照成功。 node -v npm -v 注释:Node.js中自带npm,安装Nod

Sunday97的博客 2597

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

【前端】VS Code 前端环境搭建教程

作者主页今天来跟大家分享一下关于在VS Code上搭建前端环境的方法。

2301_80955819的博客 1万+

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

前端环境搭建一览记录

我们每次更新设备之后搭建环境都是一件很头疼的事情,今天我把前端可以用到的环境配置统一总结一下,可以利用该步骤进行搭建前端的开发环境,尽快介入开发,大概包括常用的软件,工具包,配置等,每一个我都尽量介绍他的优劣。以下所有示例均为macM3pro的芯片为准。

红岸基地 2707

如何搭建前端开发环境

如何搭建前端开发环境 一、安装浏览器–Google Chrome 到Google Chrome官网下下载安装最新版的Chrome浏览器 二、安装JavaScript运行时–Node 到Node官网https:/nodejs.org/zh-cn/下载、安装并设置好最新的Node长期支持版。 1、安装 双击下载后的安装包,点击以上的Run(运行) 点击Next(下一步)按钮 勾选接受协议选项,点击next(下一步)按钮 Node.js默认安装目录为"C:\Program Files\nodejs\”,你

benbuyinggai的博客 8178

前端vue环境搭建

前端vue环境搭建 nodejs 的下载 (1)nodejs 最新版本的下载 nodejs 的下载地址(中文) nodejs的下载地址(英文) (2) nodejs旧版本的下载 (3)下载完成后的安装包 nodejs 的安装 (1)双击安装包之后 (2)install之后静等一段时间,点击finish就可以了 nodejs 的配置 (1)安装完成之后,,.msi格式的安装包已经将node启动程序添加到系统环境变量path中,查看系统变量验证。(此电脑 右击 -> 属性 -> 高级系统

waiting971118的博客 1344

前端环境搭建,保姆式教学

前端环境搭建,基础知识介绍,第一个页面编写,扩展安装

Lbycomputer的博客 1348

Mac快速搭建前端环境&创建前端项目【Vue】

问题:如果出现报错:node:77305) Warning: require() of ES modules is not supported.,表明node版本过低不支持。查询一下 raw.githubusercontent.com对应的IP 地址,然后修改本机的vim /etc/hosts文件。解决:打开网站https://www.ipaddress.com/vite:快速创建前端项目脚手架。下载:https://nodejs.org/en。官网:https://cn.vitejs.dev。

web18296061989的博客 1561

前端开发环境搭建

前端开发环境搭建

吴小迪的博客 3万+

dashboard windows 前端开发环境搭建

dashboard是kubernetes的云管平台UI界面,正常情况下,其是在linux下开发的,但是,有些特殊情况下,我们也可能希望在windows上搭建起dashboard的开发环境

目尽地平线 5262

若依前端环境搭建

jdk-8u281-windows-x64.exe,选中点击鼠标右键 点击以管理员身份运行打开终端命令行界面,输入javac命令,出现代码,表示配置环境变量成功。

wyr9263的博客 994

Mac-搭建前端开发环境

标题基于mac下前端开发基本环境搭建 VSCode + git + node.js + npm+ webpack + vue-cli4 + nrm + yarn 如何从零开始搭建前端开发环境 MAC环境 首先终端输入sudo spctl --master-disable命令来开启任何来源。如果不开启这个会导致很多软件安装不了。 安装node环境和配置cnpm和tnpm方便安装依赖。因为原版npm因网络问题可能会导致各种报错。mac在安装node的时候会自动安装git,因此可以省去这一步。 验证 确保电脑环境

qq_45585640的博客 4257

VScode前端环境搭建

VScode是企业中最常用的前端开发工具,本文描述如何利用VScode搭建前端开发环境。

m0_75262940的博客 5625

Web前端开发环境搭建

最近在学习前端开发,通过网上的查找资料和自身实践;完成了前端开发环境的简单搭建。但发现网上提供的搭建方法总有些不全,因此把自己的搭建过程分享一下,希望能为web开发入门者提供帮助,少走弯路。   搭建的环境主要安装如下插件:Nodejs+grunt+bower+express+supervisor;关于这些插件等的功能这里不详细介绍了,大家可以网上百度,基本是前端开发必备的。   少说废话,进

bushionmath的专栏 3万+
上一篇: 奇技淫巧之一
下一篇: react中的keep-alive功能
xiaojinglyd
博客等级 码龄9年 6粉丝 29原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值