teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

7

情報追記(TypeScript2)

2021/11/24 01:06

投稿

hyyrolll
hyyrolll

スコア0

title CHANGED
File without changes
body CHANGED
@@ -29,6 +29,17 @@
29
29
 
30
30
  ```TypeScript2
31
31
  import { fruits } from '~/fruits'
32
+ import {
33
+ Entity,
34
+ PrimaryGeneratedColumn,
35
+ Column,
36
+ OneToOne,
37
+ ManyToOne,
38
+ ManyToMany,
39
+ JoinTable,
40
+ OneToMany,
41
+ } from 'typeorm'
42
+ 〜略〜
32
43
 
33
44
  constructor() {
34
45
  const f = fruits // NG

6

追記

2021/11/24 01:06

投稿

hyyrolll
hyyrolll

スコア0

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

5

追記

2021/11/24 00:36

投稿

hyyrolll
hyyrolll

スコア0

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

4

情報追記

2021/11/24 00:35

投稿

hyyrolll
hyyrolll

スコア0

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

3

情報追記

2021/11/24 00:34

投稿

hyyrolll
hyyrolll

スコア0

title CHANGED
File without changes
body CHANGED
@@ -65,6 +65,25 @@
65
65
  ※importしなければエラーにならないです。
66
66
 
67
67
  ```TypeScript
68
+ import {
69
+ IsIn,
70
+ IsNumberString,
71
+ IsPhoneNumber,
72
+ IsDateString,
73
+ IsBooleanString,
74
+ IsInt,
75
+ IsString,
76
+ Min,
77
+ Length,
78
+ IsEmail,
79
+ ValidateNested,
80
+ IsOptional,
81
+ Max,
82
+ Matches,
83
+ ArrayNotEmpty,
84
+ ArrayMaxSize,
85
+ } from 'class-validator'
86
+
68
87
  export const fruits = [
69
88
  'apple',
70
89
  'orange',

2

情報追記

2021/11/24 00:19

投稿

hyyrolll
hyyrolll

スコア0

title CHANGED
File without changes
body CHANGED
@@ -1,5 +1,24 @@
1
1
  # やりたい事
2
2
  ```TypeScript1
3
+ import {
4
+ IsIn,
5
+ IsNumberString,
6
+ IsPhoneNumber,
7
+ IsDateString,
8
+ IsBooleanString,
9
+ IsInt,
10
+ IsString,
11
+ Min,
12
+ Length,
13
+ IsEmail,
14
+ ValidateNested,
15
+ IsOptional,
16
+ Max,
17
+ Matches,
18
+ ArrayNotEmpty,
19
+ ArrayMaxSize,
20
+ } from 'class-validator'
21
+
3
22
  export const fruits = [
4
23
  'apple',
5
24
  'orange',
@@ -16,10 +35,26 @@
16
35
  ```
17
36
 
18
37
  ### 発生している問題・エラーメッセージ
38
+ TypeScript1でimportしているnpmモジュールについて、These dependencies were not foundのビルドエラーが発生
19
39
 
20
40
  ```
21
- TypeScript1でimportしているnpmモジュールについて、These dependencies were not foundのビルドエラーが発生
41
+ ERROR Failed to compile with 31 errors friendly-errors 09:01:17
22
42
 
43
+ These dependencies were not found: friendly-errors 09:01:17
44
+ friendly-errors 09:01:17
45
+ * @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
46
+ * @apollo/gateway in ../server/node_modules/@nestjs/graphql/dist/federation/graphql-gateway.module.js friendly-errors 09:01:17
47
+ * @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
48
+ * @apollo/subgraph/dist/directives in ../server/node_modules/@nestjs/graphql/dist/graphql-schema.builder.js friendly-errors 09:01:17
49
+ * @nestjs/microservices in ../server/node_modules/@nestjs/core/nest-application.js friendly-errors 09:01:17
50
+ * @nestjs/microservices/microservices-module in ../server/node_modules/@nestjs/core/nest-application.js friendly-errors 09:01:17
51
+ * @nestjs/websockets/socket-module in ../server/node_modules/@nestjs/core/nest-application.js friendly-errors 09:01:17
52
+ * 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
53
+ * cache-manager in ../server/node_modules/@nestjs/common/cache/cache.providers.js friendly-errors 09:01:17
54
+ * class-transformer/storage in ../server/node_modules/@nestjs/mapped-types/dist/type-helpers.utils.js friendly-errors 09:01:17
55
+ * 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
56
+ * net in ../server/node_modules/express/lib/request.js friendly-errors 09:01:17
57
+ * ts-morph in ../server/node_modules/@nestjs/graphql/dist/graphql-ast.explorer.js
23
58
  ```
24
59
 
25
60
  ### 補足情報(FW/ツールのバージョンなど)

1

補足追記

2021/11/24 00:16

投稿

hyyrolll
hyyrolll

スコア0

title CHANGED
File without changes
body CHANGED
@@ -25,4 +25,17 @@
25
25
  ### 補足情報(FW/ツールのバージョンなど)
26
26
 
27
27
  Nuxt: ^2.15.7
28
- TypeScript: 4.2.4
28
+ TypeScript: 4.2.4
29
+
30
+ ※importしなければエラーにならないです。
31
+
32
+ ```TypeScript
33
+ export const fruits = [
34
+ 'apple',
35
+ 'orange',
36
+ ] as const
37
+
38
+ constructor() {
39
+ const f = fruits // OK
40
+ }
41
+ ```