質問編集履歴

7

情報追記(TypeScript2)

2021/11/24 01:06

投稿

hyyrolll
hyyrolll

スコア0

test CHANGED
File without changes
test CHANGED
@@ -60,6 +60,28 @@
60
60
 
61
61
  import { fruits } from '~/fruits'
62
62
 
63
+ import {
64
+
65
+ Entity,
66
+
67
+ PrimaryGeneratedColumn,
68
+
69
+ Column,
70
+
71
+ OneToOne,
72
+
73
+ ManyToOne,
74
+
75
+ ManyToMany,
76
+
77
+ JoinTable,
78
+
79
+ OneToMany,
80
+
81
+ } from 'typeorm'
82
+
83
+ 〜略〜
84
+
63
85
 
64
86
 
65
87
  constructor() {

6

追記

2021/11/24 01:06

投稿

hyyrolll
hyyrolll

スコア0

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  # やりたい事
2
2
 
3
- - TypeScript2をtsconfigのpathsで経由でimportして、TypeScript1で利用
3
+ - TypeScript1をtsconfigのpathsで経由でimportして、TypeScript2で利用
4
4
 
5
5
 
6
6
 

5

追記

2021/11/24 00:36

投稿

hyyrolll
hyyrolll

スコア0

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  # やりたい事
2
2
 
3
- - TypeScript2をtsconfigのpathsで経由でimportして利用
3
+ - TypeScript2をtsconfigのpathsで経由でimportして、TypeScript1で利用
4
4
 
5
5
 
6
6
 

4

情報追記

2021/11/24 00:35

投稿

hyyrolll
hyyrolll

スコア0

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,8 @@
1
1
  # やりたい事
2
+
3
+ - TypeScript2をtsconfigのpathsで経由でimportして利用
4
+
5
+
2
6
 
3
7
  ```TypeScript1
4
8
 

3

情報追記

2021/11/24 00:34

投稿

hyyrolll
hyyrolll

スコア0

test CHANGED
File without changes
test CHANGED
@@ -132,6 +132,44 @@
132
132
 
133
133
  ```TypeScript
134
134
 
135
+ import {
136
+
137
+ IsIn,
138
+
139
+ IsNumberString,
140
+
141
+ IsPhoneNumber,
142
+
143
+ IsDateString,
144
+
145
+ IsBooleanString,
146
+
147
+ IsInt,
148
+
149
+ IsString,
150
+
151
+ Min,
152
+
153
+ Length,
154
+
155
+ IsEmail,
156
+
157
+ ValidateNested,
158
+
159
+ IsOptional,
160
+
161
+ Max,
162
+
163
+ Matches,
164
+
165
+ ArrayNotEmpty,
166
+
167
+ ArrayMaxSize,
168
+
169
+ } from 'class-validator'
170
+
171
+
172
+
135
173
  export const fruits = [
136
174
 
137
175
  'apple',

2

情報追記

2021/11/24 00:19

投稿

hyyrolll
hyyrolll

スコア0

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,44 @@
1
1
  # やりたい事
2
2
 
3
3
  ```TypeScript1
4
+
5
+ import {
6
+
7
+ IsIn,
8
+
9
+ IsNumberString,
10
+
11
+ IsPhoneNumber,
12
+
13
+ IsDateString,
14
+
15
+ IsBooleanString,
16
+
17
+ IsInt,
18
+
19
+ IsString,
20
+
21
+ Min,
22
+
23
+ Length,
24
+
25
+ IsEmail,
26
+
27
+ ValidateNested,
28
+
29
+ IsOptional,
30
+
31
+ Max,
32
+
33
+ Matches,
34
+
35
+ ArrayNotEmpty,
36
+
37
+ ArrayMaxSize,
38
+
39
+ } from 'class-validator'
40
+
41
+
4
42
 
5
43
  export const fruits = [
6
44
 
@@ -34,13 +72,45 @@
34
72
 
35
73
  ### 発生している問題・エラーメッセージ
36
74
 
75
+ TypeScript1でimportしているnpmモジュールについて、These dependencies were not foundのビルドエラーが発生
76
+
37
77
 
38
78
 
39
79
  ```
40
80
 
41
- TypeScript1でimportしているnpmモジュールについて、These dependencies were not foundのビルドエラーが発生
81
+ ERROR Failed to compile with 31 errors friendly-errors 09:01:17
42
82
 
43
83
 
84
+
85
+ These dependencies were not found: friendly-errors 09:01:17
86
+
87
+ friendly-errors 09:01:17
88
+
89
+ * @apollo/federation in ../server/node_modules/@nestjs/graphql/dist/graphql-definitions.factory.js, ../server/node_modules/@nestjs/graphql/dist/federation/graphql-federation.factory.js friendly-errors 09:01:17
90
+
91
+ * @apollo/gateway in ../server/node_modules/@nestjs/graphql/dist/federation/graphql-gateway.module.js friendly-errors 09:01:17
92
+
93
+ * @apollo/subgraph in ../server/node_modules/@nestjs/graphql/dist/graphql-definitions.factory.js, ../server/node_modules/@nestjs/graphql/dist/federation/graphql-federation.factory.js friendly-errors 09:01:17
94
+
95
+ * @apollo/subgraph/dist/directives in ../server/node_modules/@nestjs/graphql/dist/graphql-schema.builder.js friendly-errors 09:01:17
96
+
97
+ * @nestjs/microservices in ../server/node_modules/@nestjs/core/nest-application.js friendly-errors 09:01:17
98
+
99
+ * @nestjs/microservices/microservices-module in ../server/node_modules/@nestjs/core/nest-application.js friendly-errors 09:01:17
100
+
101
+ * @nestjs/websockets/socket-module in ../server/node_modules/@nestjs/core/nest-application.js friendly-errors 09:01:17
102
+
103
+ * apollo-server-fastify in ../server/node_modules/@nestjs/graphql/dist/graphql.module.js, ../server/node_modules/@nestjs/graphql/dist/federation/graphql-federation.module.js friendly-errors 09:01:17
104
+
105
+ * cache-manager in ../server/node_modules/@nestjs/common/cache/cache.providers.js friendly-errors 09:01:17
106
+
107
+ * class-transformer/storage in ../server/node_modules/@nestjs/mapped-types/dist/type-helpers.utils.js friendly-errors 09:01:17
108
+
109
+ * fs in ../server/node_modules/@nestjs/graphql/dist/graphql-types.loader.js, ../server/node_modules/@nestjs/graphql/dist/schema-builder/helpers/file-system.helper.js and 14 others friendly-errors 09:01:17
110
+
111
+ * net in ../server/node_modules/express/lib/request.js friendly-errors 09:01:17
112
+
113
+ * ts-morph in ../server/node_modules/@nestjs/graphql/dist/graphql-ast.explorer.js
44
114
 
45
115
  ```
46
116
 

1

補足追記

2021/11/24 00:16

投稿

hyyrolll
hyyrolll

スコア0

test CHANGED
File without changes
test CHANGED
@@ -53,3 +53,29 @@
53
53
  Nuxt: ^2.15.7
54
54
 
55
55
  TypeScript: 4.2.4
56
+
57
+
58
+
59
+ ※importしなければエラーにならないです。
60
+
61
+
62
+
63
+ ```TypeScript
64
+
65
+ export const fruits = [
66
+
67
+ 'apple',
68
+
69
+ 'orange',
70
+
71
+ ] as const
72
+
73
+
74
+
75
+ constructor() {
76
+
77
+ const f = fruits // OK
78
+
79
+ }
80
+
81
+ ```