fix: 修改ts问题
This commit is contained in:
parent
c44b0f7c21
commit
bfa8358fc4
@ -24,7 +24,7 @@ group:
|
||||
|
||||
<!-- 版本好可以根据需求来变更 14.X 16.X -->
|
||||
|
||||
- curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash -
|
||||
- curl -fsSL https://rpm.nodesource.com/setup_18.x | bash -
|
||||
|
||||
- sudo yum install -y nodejs
|
||||
|
||||
@ -48,7 +48,7 @@ export PATH=$NODE_HOME/bin:$PATH
|
||||
1. 第一步
|
||||
|
||||
```js
|
||||
wget https://npm.taobao.org/mirrors/node/v12.16.1/node-v12.16.1-linux-x64.tar.gz
|
||||
wget https://nodejs.org/dist/v16.13.2/node-v16.13.2-linux-x64.tar.xz
|
||||
```
|
||||
|
||||
2. 第二步
|
||||
@ -85,3 +85,14 @@ ln -s /usr/local/bin/node/bin/npx /usr/bin/npx
|
||||
1. cjs 即为 CommonJs, 属于早期的 node 规范,可以使用 require 进行引用,module.exports 导出。
|
||||
2. esm 即为 Es module,属于 es6 提出之后版本的新的规范,语法是可以用 import 引用,export default 导出。
|
||||
3. umd 即为 Universal Module Definition(通用模块定义),也就是最基本的可在浏览器和 node 端执行的 js 代码。
|
||||
|
||||
## Q&A
|
||||
|
||||
### Error: Package: 2:nodejs-18.19.1-1nodesource.x86_64 (nodesource-nodejs)
|
||||
|
||||
你可以尝试下面的命令
|
||||
|
||||
```
|
||||
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
|
||||
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
|
||||
```
|
||||
|
24
docs/fea/ts/Q&A.md
Normal file
24
docs/fea/ts/Q&A.md
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
nav:
|
||||
title: 前端
|
||||
path: /fea
|
||||
group:
|
||||
title: 💊 TypeScript
|
||||
order: 3
|
||||
path: /ts
|
||||
---
|
||||
|
||||
## Q&A
|
||||
|
||||
### 在 monorepo 架构下,子包之间相互引用,ts 总是会提示找不到对应的包
|
||||
|
||||
可以在根目录下的 tsconfig.json 如下配置:
|
||||
|
||||
```json
|
||||
{
|
||||
...
|
||||
"paths": {
|
||||
"@packages/*": ["packages/*/src/"]
|
||||
}
|
||||
}
|
||||
```
|
@ -202,15 +202,50 @@ http {
|
||||
|
||||
## Q&A
|
||||
|
||||
### 1. forbedden 403
|
||||
### forbedden 403
|
||||
|
||||
> chmod -R 777 /data
|
||||
> chmod -R 777 /data/www
|
||||
第一种方法给文件夹加上权限,第二种方法切换一个更高级别的账号
|
||||
|
||||
当然我更建议使用第一种
|
||||
|
||||
```js
|
||||
chmod -R 777 /data
|
||||
chmod -R 777 /data/www
|
||||
```
|
||||
|
||||
还不行的话尝试关闭 selinux,具体操作如下:
|
||||
|
||||
```javascript
|
||||
还不行的话尝试关闭 selinux:
|
||||
vi /etc/selinux/config
|
||||
|
||||
#SELINUX=enforcing
|
||||
SELINUX=disabled
|
||||
```
|
||||
|
||||
### Could not resolve host: mirrorlist.centos.org Centos 7
|
||||
|
||||
#### 第一步:进入 /etc/resolv.conf
|
||||
|
||||
加入文件配置内容如下:
|
||||
|
||||
```json
|
||||
nameserver 9.9.9.9
|
||||
```
|
||||
|
||||
### loaded plugins: fastestmirror, langpacks loading mirror speeds from cached hostfile
|
||||
|
||||
1.修改插件的配置文件
|
||||
|
||||
```
|
||||
# vi /etc/yum/pluginconf.d/fastestmirror.conf
|
||||
```
|
||||
|
||||
将 enabled=1 改为 enabled=0
|
||||
|
||||
2.修改 yum 的配置文件
|
||||
|
||||
```
|
||||
# vi /etc/yum.conf
|
||||
```
|
||||
|
||||
将 plugins=1 改为 plugins=0
|
||||
|
Loading…
Reference in New Issue
Block a user