Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR in src/config/config.ts:10:1 TS2304: Cannot find name 'exports'. 8 | 9 | //资源环境 > 10 | exports.PRODUCTION = PRODUCTION | ^^^^^^^ 11 | //静态资源CDN 12 | exports.EXTERNALS = PRODUCTION ? CDN.PROD_EXTERNALS : CDN.DEV_EXTERNALS 13 | //静态资源CDN #1

Open
yanghj19 opened this issue Feb 25, 2024 · 0 comments

Comments

@yanghj19
Copy link

直接克隆后,npm i,npm run serve报以下错误
ERROR in src/config/config.ts:10:1
TS2304: Cannot find name 'exports'.
8 |
9 | //资源环境

10 | exports.PRODUCTION = PRODUCTION
| ^^^^^^^
11 | //静态资源CDN
12 | exports.EXTERNALS = PRODUCTION ? CDN.PROD_EXTERNALS : CDN.DEV_EXTERNALS
13 | //静态资源CDN
ERROR in src/config/config.ts:12:1
TS2304: Cannot find name 'exports'.
10 | exports.PRODUCTION = PRODUCTION
11 | //静态资源CDN
12 | exports.EXTERNALS = PRODUCTION ? CDN.PROD_EXTERNALS : CDN.DEV_EXTERNALS
| ^^^^^^^
13 | //静态资源CDN
14 | exports.STATIC_CDN = PRODUCTION ? CDN.prodCDN : CDN.devCDN
15 | //资源环境

ERROR in src/config/config.ts:14:1
TS2304: Cannot find name 'exports'.
12 | exports.EXTERNALS = PRODUCTION ? CDN.PROD_EXTERNALS : CDN.DEV_EXTERNALS
13 | //静态资源CDN

14 | exports.STATIC_CDN = PRODUCTION ? CDN.prodCDN : CDN.devCDN
| ^^^^^^^
15 | //资源环境
16 | //Api restful 地址
17 | exports.BASE_URL = BASE.BASE_URL

ERROR in src/config/config.ts:17:1
TS2304: Cannot find name 'exports'.
15 | //资源环境
16 | //Api restful 地址

17 | exports.BASE_URL = BASE.BASE_URL
| ^^^^^^^
18 | //DEV host 地址
19 | exports.DEV_HOST = BASE.DEV_HOST
20 | //DEV port 端口

ERROR in src/config/config.ts:19:1
TS2304: Cannot find name 'exports'.
17 | exports.BASE_URL = BASE.BASE_URL
18 | //DEV host 地址

19 | exports.DEV_HOST = BASE.DEV_HOST
| ^^^^^^^
20 | //DEV port 端口
21 | exports.DEV_PORT = BASE.DEV_PORT
22 | //DEV proxy

ERROR in src/config/config.ts:21:1
TS2304: Cannot find name 'exports'.
19 | exports.DEV_HOST = BASE.DEV_HOST
20 | //DEV port 端口

21 | exports.DEV_PORT = BASE.DEV_PORT
| ^^^^^^^
22 | //DEV proxy
23 | exports.PROXY_ROOT = BASE.PROXY_ROOT
24 | //DEV环境数据使用 mock数据 还是api接口数据

ERROR in src/config/config.ts:23:1
TS2304: Cannot find name 'exports'.
21 | exports.DEV_PORT = BASE.DEV_PORT
22 | //DEV proxy

23 | exports.PROXY_ROOT = BASE.PROXY_ROOT
| ^^^^^^^
24 | //DEV环境数据使用 mock数据 还是api接口数据
25 | //value: mock | api default value: api
26 | exports.DEV_DATA_SOURCE = BASE.DEV_DATA_SOURCE || 'mock'

ERROR in src/config/config.ts:26:1
TS2304: Cannot find name 'exports'.
24 | //DEV环境数据使用 mock数据 还是api接口数据
25 | //value: mock | api default value: api

26 | exports.DEV_DATA_SOURCE = BASE.DEV_DATA_SOURCE || 'mock'
| ^^^^^^^
27 |

ERROR in src/config/modules/base.ts:5:4
TS2304: Cannot find name 'exports'.
3 | if (process.env.NODE_ENV === 'production') {
4 | //http restful API 请求地址

5 | exports.BASE_URL = 'https://api.todoadmin.com'
| ^^^^^^^
6 | } else {
7 | //Dev开发环境 http restful API 请求地址
8 | exports.BASE_URL = 'http://localhost:8080'

ERROR in src/config/modules/base.ts:8:3
TS2304: Cannot find name 'exports'.
6 | } else {
7 | //Dev开发环境 http restful API 请求地址

8 | exports.BASE_URL = 'http://localhost:8080'
| ^^^^^^^
9 | }
10 | /** 后缀地址(可以为版本目录,如:/v1) */
11 | exports.PREFIX_PATH = '/v1'

ERROR in src/config/modules/base.ts:11:1
TS2304: Cannot find name 'exports'.
9 | }
10 | /** 后缀地址(可以为版本目录,如:/v1) */

11 | exports.PREFIX_PATH = '/v1'
| ^^^^^^^
12 |
13 | //DEV host 地址
14 | exports.DEV_HOST = 'localhost'

ERROR in src/config/modules/base.ts:14:1
TS2304: Cannot find name 'exports'.
12 |
13 | //DEV host 地址

14 | exports.DEV_HOST = 'localhost'
| ^^^^^^^
15 | //DEV port 端口
16 | exports.DEV_PORT = '8080'
17 | //DEV proxy

ERROR in src/config/modules/base.ts:16:1
TS2304: Cannot find name 'exports'.
14 | exports.DEV_HOST = 'localhost'
15 | //DEV port 端口

16 | exports.DEV_PORT = '8080'
| ^^^^^^^
17 | //DEV proxy
18 | exports.PROXY_ROOT = '/api'
19 | //DEV环境数据使用 mock数据 还是api接口数据

ERROR in src/config/modules/base.ts:18:1
TS2304: Cannot find name 'exports'.
16 | exports.DEV_PORT = '8080'
17 | //DEV proxy

18 | exports.PROXY_ROOT = '/api'
| ^^^^^^^
19 | //DEV环境数据使用 mock数据 还是api接口数据
20 | //value: mock | api
21 | exports.DEV_DATA_SOURCE = 'mock'

ERROR in src/config/modules/base.ts:21:1
TS2304: Cannot find name 'exports'.
19 | //DEV环境数据使用 mock数据 还是api接口数据
20 | //value: mock | api

21 | exports.DEV_DATA_SOURCE = 'mock'
| ^^^^^^^
22 |

ERROR in src/config/modules/cdn.ts:9:1
TS2304: Cannot find name 'exports'.
7 | const ver = pack.dependencies
8 | //生产环境的CDN连接地址 production cdn link

9 | exports.prodCDN = {
| ^^^^^^^
10 | css: [
11 | 'https://cdn.bootcdn.net/ajax/libs/element-plus/' + ver['element-plus'].replace(/~|^/g, '') + '/index.css',
12 | 'https://cdn.bootcdn.net/ajax/libs/github-markdown-css/' + ver['github-markdown-css'].replace(/~|^/g, '') + '/github-markdown.min.css',

ERROR in src/config/modules/cdn.ts:28:1
TS2304: Cannot find name 'exports'.
26 |
27 | //DEV环境的CDN连接地址 dev cdn link

28 | exports.devCDN = {
| ^^^^^^^
29 | css: [
30 | '/assets/css/element-plus.min.css',
31 | '/assets/css/github-markdown.min.css',

ERROR in src/config/modules/cdn.ts:38:1
TS2304: Cannot find name 'exports'.
36 |
37 | //cdn方式引入文件,以下文件不打包,使用外部CDN连接

38 | exports.PROD_EXTERNALS = {
| ^^^^^^^
39 | vue:'Vue',
40 | 'vue-router': 'VueRouter',
41 | 'vue-demi': 'VueDemi',

ERROR in src/config/modules/cdn.ts:49:1
TS2304: Cannot find name 'exports'.
47 | }
48 |

49 | exports.DEV_EXTERNALS = {}
| ^^^^^^^
50 |

ERROR in src/service/http/index.ts:5:27
TS7016: Could not find a declaration file for module 'events'. 'C:/Users/yanghj19/vue-admin-chart-main/node_modules/events/events.js' implicitly has an 'any' type.
Try npm i --save-dev @types/events if it exists or add a new declaration (.d.ts) file containing declare module 'events';
3 | */
4 | import axios from "axios"

5 | import EventEmitter from 'events'
| ^^^^^^^^
6 | import { G } from '@/config' //引入常量和配置信息
7 | import { ElLoading } from 'element-plus'
8 | // 导入模块

ERROR in src/views/form/other.vue:433:9
TS2322: Type '""' is not assignable to type 'EpPropMergeType<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown>'.
431 | }
432 | const items = ref<Array>([

433 | { type: '', label: 'Tag 1' },
| ^^^^
434 | { type: 'success', label: 'Tag 2' },
435 | { type: 'info', label: 'Tag 3' },
436 | { type: 'danger', label: 'Tag 4' },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant