vue项目安装less_部署vue项目、安装mongodb

05aa7acdcbcb5434c46d13d6058cef59.png

一、node运行环境

1、npm install -g n

通过npm 全局安装node

2、sudo n 8.16.0

设置node版本

Password:

install : node-v8.16.0

mkdir : /usr/local/n/versions/node/8.16.0

fetch : https://nodejs.org/dist/v8.16.0/node-v8.16.0-darwin-x64.tar.gz

######################################################################## 100.0%

installed : v8.16.0

3、node -v

v8.16.0

二、安装mongodb

1、brew tap mongodb/brew

2、brew install mongodb-community

=> Installing mongodb-community from mongodb/brew

==> Downloading https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.2.5.tgz

######################################################################## 100.0%

==> Caveats

To have launchd start mongodb/brew/mongodb-community now and restart at login:

brew services start mongodb/brew/mongodb-community

Or, if you don't want/need a background service you can just run:

mongod --config /usr/local/etc/mongod.conf

==> Summary

/usr/local/Cellar/mongodb-community/4.2.5: 21 files, 305.9MB, built in 7 minutes 4 seconds

(base) mengfaniaodeMBP:homebrew-core mengfanxiao$ cat usr/local/etc/mongod.conf

cat: usr/local/etc/mongod.conf: No such file or directory

(base) mengfaniaodeMBP:homebrew-core mengfanxiao$ brew services start mongodb/brew/mongodb-community

==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)

3、启动/停止

brew services start mongodb-community

brew services stop mongodb-community

4、配置

配置文件:/usr/local/etc/mongod.conf

日志目录路径:/usr/local/var/log/mongodb

数据目录路径:/usr/local/var/mongodb

5、端口

默认端口

介绍

27017

mongod 和 mongos 实例的默认端口。你可以通过 port 或 --port 改变该端口。

27018

设置 --shardsvr 运行变量或在配置文件里设置 clusterRole 为 shardsvr 时的默认端口。

27019

设置 --configsvr 运行变量或在配置文件中将 clusterRole 设置为 configsvr 时的默认端口。

28017

系统状态网页的默认端口。系统状态网络页面永远可以在比 port 大 1000 的端口反问。

三、问题梳理

1、环境问题

node -v

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib

Referenced from: /usr/local/bin/node

Reason: image not found

Abort trap: 6

说明node相关库已被损坏 需要重新安装

卸载node

brew uninstall --ignore-dependencies node icu4c

Uninstalling /usr/local/Cellar/node/13.5.0... (4,663 files, 59.1MB)

node 12.12.0 is still installed.

Run `brew uninstall --force node` to remove all versions.

安装node

brew install node

通过这种方式安装的是最新版本的node 但很容易出现版本不兼容问题 所以不推荐这么安装 建议安装node8 该版本比较稳定 很少出现与其他软件不兼容情况

2、文件创建权限问题

==> Installing dependencies for node: icu4c

==> Installing node dependency: icu4c

==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles/icu4c-64.2.mojave.bottle.tar.gz

######################################################################## 100.0%

==> Pouring icu4c-64.2.mojave.bottle.tar.gz

Error: Failed to create /usr/local/opt/icu4c

Things that depend on icu4c will probably not build.

Could not symlink .

/usr/local/opt is not writable.

==> Caveats

a、创建文件夹

sudo mkdir /usr/local/opt

b、root用户赋予当前用户操作该文件夹权限

此时该文件夹权限属于root 给mengfanxiao账户赋予权限

chown -R mengfanxiao /usr/local/opt

3、插曲 springboot启动问题

dea启动spring-boot,报java.lang.NoClassDefFoundError: javax/servlet/ServletContext错误

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-tomcat</artifactId>

<scope>provided</scope>

</dependency>

把scope注释掉即可

maven中三种classpath

编译,测试,运行

1.compile:默认范围,编译测试运行都有效

2.provided:在编译和测试时有效

3.runtime:在测试和运行时有效

4.test:只在测试时有效

5.system:在编译和测试时有效,与本机系统关联,可移植性差

4、环境不匹配问题

Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (79)qi

卸载重装(最新版本的node-sass)即可:

npm uninstall node-sass -D

npm install node-sass -D

5、版本冲突问题 node和mongodb版本不兼容

mongodb-core@1.2.31 requires a peer of kerberos@~0.0

node -v v13.12.0

npm -v 6.14.4

gyp ERR! command "/usr/local/Cellar/node/13.12.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/mengfanxiao/Documents/project/company/wechain/questionnaire/node_modules/leveldown

gyp ERR! node -v v13.12.0

gyp ERR! node-gyp -v v5.1.0

gyp ERR! not ok

npm WARN mongodb-core@1.2.31 requires a peer of kerberos@~0.0 but none is installed. You must install peer dependencies yourself.

这种情况需要安装node8

brew search node

==> Formulae

libbitcoin-node node node-sass node@12 nodebrew nodenv

llnode node-build node@10 node_exporter ✔ nodeenv

如果有node8

则 brew install node@8

然后brew link --overwrite --force node@8

没有node8

npm install -g n

sudo n 8.16.0

安装了node8版本

npm install

> leveldown@1.7.2 install /Users/mengfanxiao/Documents/project/company/wechain/new/questionnaire/node_modules/level/node_modules/leveldown

> prebuild-install || node-gyp rebuild

added 42 packages from 44 contributors in 20.79s

6、安装mongodb问题

brew install mongodb

Error: No available formula with the name 'mongodb'

MongoDB不再是开源的了,并且已经从Homebrew中移除 #43770

安装MongoDB社区服务器的最新可用生产版本(包括所有命令行工具)。这将安装MongoDB 4.2.x:

$ brew install mongodb-community

安装MongoDB社区服务器和命令行工具的最新4.2.x生产版本:

$ brew install mongodb-community@4.2

安装MongoDB社区服务器和命令行工具的最新4.0.x生产版本:

$ brew install mongodb-community@4.0

安装MongoDB社区服务器和命令行工具的最新3.6.x生产版本:

$ brew install mongodb-community@3.6

仅安装最新的mongoshell以连接到远程MongoDB实例:

$ brew install mongodb-community-shell

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/358980.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

电脑正常启动黑屏,安全模式正常启动的解决办法

今天早上起来&#xff0c;打开电脑&#xff0c;输入账号信息进入后发现是黑屏&#xff0c;本以为电脑卡顿等等看&#xff0c;我看还是黑屏就关机重启了几次发现还是黑屏&#xff0c;然后进入安全模式下发现页面能打开&#xff0c;但是我们都知道安全模式只会加载一些必要的程序…

NHibernate实例化类部分属性

NHibernate 为习惯SQL的开发者提供了接口&#xff0c;将查询的结果转变为持久化对象。虽然该方法不是很提倡。 GetCurrentSession().CreateSQLQuery(sql)参数sql就是实际要执行的sql语句。 如果需要将结果转化为持久换对象&#xff0c;那需要提供对象类型。 GetCurrentSession(…

2.4 万余门在线课程免费开放!大量计算机相关课程.(赶紧收藏)

日前,教育部印发指导意见,面向全国高校免费开放全部优质在线课程和虚拟仿真实验教学资源。 截至 2 月 2 日,教育部组织了 22 个在线课程平台制定了多样化在线教学解决方案,免费开放包括 1291 门国家精品在线开放课程和 401 门国家虚拟仿真实验课程在内的在线课程 2.4 万余门…

osgi和spring区别_OSGI和Spring动态模块–简单的Hello World

osgi和spring区别在此姿势中&#xff0c;我们将采用使用OSGi进行的第一个实现&#xff0c;并使用Spring Dynamic Modules改进应用程序。 Spring动态模块&#xff08;Spring Dm&#xff09;使基于OSGi的应用程序的开发更加容易。 这样&#xff0c;服务的部署就容易得多。 您可以…

mysql binary blob区别_SQL中binary 和 varbinary的区别 blob

binary 和 varbinary固定长度 (binary) 的或可变长度 (varbinary) 的 binary 数据类型。binary [ ( n ) ]固定长度的 n 个字节二进制数据。N 必须从 1 到 8,000。存储空间大小为 n4 字节。varbinary [ ( n ) ]n 个字节变长二进制数据。n 必须从 1 到 8,000。存储空间大小为实际…

线上测试bug工具

根据每个公司性质的不同&#xff0c;规模的不同&#xff0c;所用到的bug管理工具也可能不同。你们用的bug管理工具是什么呢&#xff1f; 1. JIRA&#xff08;付费&#xff09; IRA的生产者把JIRA定义为Professional Issue Tracker&#xff0c;即它是一个专业的问题跟踪管理的…

关于bolg

云笔记挺好用的&#xff0c;博客不更了。转载于:https://www.cnblogs.com/usedrosee/p/4434618.html

Java Micro Framework:您无法忽略的新趋势

什么是Java微框架&#xff0c;为什么要使用它们&#xff1f; 每种语言都有权衡。 对于Java&#xff0c;要成为一种安全&#xff0c;经过严格测试&#xff0c;向后兼容的语言&#xff0c;就要在敏捷性和精简性方面做出一些牺牲。 毫无疑问&#xff0c;它有一些冗长和冗长的内容…

springboot mysql时区设置_java/springboot/mysql时区问题解决方案

解决步骤&#xff1a;先理清楚逻辑数据从mysql查出-->进入docker(没容器化跳过)-->进入相应的应用程序(比如java或者框架springboot之类的)-->程序处理完输出返回给前端或者页面-->展示第一步:先查mysql所以先进入mysql控制台&#xff0c;select now(),时区没问题则…

无法获取签名信息,请上传有效包(110506)

此篇文章将要介绍安卓App提交应用商店时遇到的两个小问题的相关介绍&#xff0c;具体代码请看下文 陆陆续续做了一个半月左右的「喵呜天气」终于在今天下午成功提交到应用商店&#xff08;腾讯应用宝&#xff09;。期间遇到两个小问题&#xff0c;记录如下&#xff1a; 1、上…

工作一个月有感

一年前的自己肯定想不到现在的工作内容&#xff0c;那时候的自己还抱着 effective c&#xff0c;刷着 leetcode&#xff0c;准备实习生面试呢。我一直以为自己毕业后要做 c 服务器端开发&#xff0c;而现在已与当初的想法越走越远了&#xff0c;我把书架上 c 的书收了起来&…

mysql 数据如何存储,MySQL如何存储数据

I looked around google but didnt find any good answers. Does it store the data in one big file? What methods does it use to make data access quicker them just reading and writing to a regular file?解决方案Does it store the data in one big file?Some DBMS…

openshift_红帽Openshift:入门–云中的Java EE6

openshift现在有一段时间&#xff0c;我正在研究“云”。 研究它的功能&#xff0c;它可以做什么&#xff0c;为什么我们应该切换到“云”&#xff0c;进行交谈&#xff0c;与Realmaolmen的云专家maartenballiauw等人交谈。 我已经在Google App Engine&#xff08;用于Java&…

【APICloud系列|10】最新苹果APP上架App Store流程(超详细)

2018最新整理iOS app上架app详细教程 上架iOS需要一个付费688的开发者账号,还没有的话申请一个或者借用。 申请苹果开发者账号教程 上架App Store之前是先安装到苹果手机测试调试好,app能正常运行再上架

.Net面试经验,从北京到杭州

首先简单说下&#xff0c;本人小本&#xff0c;目前大四软件工程专业&#xff0c;大三阴差阳错地选了.Net方向&#xff0c;也是从大三开始接触.Net。自认为在学生中.net基础还可以&#xff0c;嘿嘿&#xff0c;吹一下。 大四第一学期学校安排去北京培训&#xff0c;培训了两个月…

proxifier访问https错误_教你实现IE访问https网站不出错方法

不同的系统出现的问题是不一样的&#xff0c;有小伙伴在电脑账打开我们的网站的时候发现不能正常的打开我们的电脑出现&#xff0c;是否只查看安全传送的网页内容的错误的提示&#xff0c;那我们遇到这个问题应该怎么处理访问https网站呢&#xff0c;今天小编就来跟大家分享一下…

Gradle入门:集成测试

因为Java项目的标准项目布局仅定义了一个测试目录&#xff08; src / test &#xff09;&#xff0c;所以我们没有将集成测试添加到Gradle构建中的标准方法。 如果要使用标准项目布局&#xff0c;则可以使用以下选项之一将集成测试添加到Gradle构建中&#xff1a; 我们可以将…

【APICloud系列|11】使用APPuploader申请ios开发证书及ios发布证书教程

开发证书用于app测试。申请ios开发证书 发布证书用于上架。ios发布证书 我开发的APP使用APICloud,简单走一下编译的流程&#xff0c;然后直接上架到APP store.完整的开发&#xff0c;window电脑&#xff0c;安卓手机&#xff0c;苹果手机&#xff0c;mac电脑还是很有必要的。…

orchard mysql_如何在Orchard CMS 1.3.10中使用MySQL数据库?

您正在讨论的错误是因为DatabaseOptions属性是一个布尔值。您需要更改该属性以接受字符串值。安装控制器中有一些地方需要更改该属性的使用方式...但是&#xff0c;最重要的部分是实现DataServicesProvider。我将我添加到核心&#xff0c;但我认为你可以把它作为一个功能放在设…

UIButton-初识IOS

今天&#xff0c;我学到了所有app经常用到的UIButton控件&#xff0c;废话不多说&#xff0c;这些都是我学习的时候总结的一些&#xff0c;希望可以帮到以后的初学者&#xff0c;IOS初学不应该直接拖拽&#xff0c;感觉不易于理解&#xff0c;所以我总结的基本上全是纯代码编辑…