質問編集履歴
2
ファイル名追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,7 +46,9 @@
|
|
46
46
|
|
47
47
|
そして以下のように編集を行いました。
|
48
48
|
|
49
|
+
|
50
|
+
|
49
|
-
```index
|
51
|
+
```indexhtml
|
50
52
|
|
51
53
|
|
52
54
|
|
@@ -92,7 +94,7 @@
|
|
92
94
|
|
93
95
|
|
94
96
|
|
95
|
-
```renderer
|
97
|
+
```rendererjs
|
96
98
|
|
97
99
|
// This file is required by the index.html file and will
|
98
100
|
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
使用バージョン
|
2
|
+
|
3
|
+
```cmd
|
4
|
+
|
5
|
+
PS D:\Electron_project\electron-quick-start> node -v
|
6
|
+
|
7
|
+
v10.16.0
|
8
|
+
|
9
|
+
PS D:\Electron_project\electron-quick-start> npm -v
|
10
|
+
|
11
|
+
6.9.0
|
12
|
+
|
13
|
+
```
|
14
|
+
|
15
|
+
|
16
|
+
|
1
17
|
Electronのquickstartの手順に従い、適当なディレクトリを作成し
|
2
18
|
|
3
19
|
|
@@ -30,9 +46,9 @@
|
|
30
46
|
|
31
47
|
そして以下のように編集を行いました。
|
32
48
|
|
49
|
+
```index.html
|
33
50
|
|
34
51
|
|
35
|
-
```html
|
36
52
|
|
37
53
|
<!DOCTYPE html>
|
38
54
|
|
@@ -60,7 +76,9 @@
|
|
60
76
|
|
61
77
|
<!-- You can also require other files to run in this process -->
|
62
78
|
|
79
|
+
|
80
|
+
|
63
|
-
<!-- 追加
|
81
|
+
<!-- 追加 -->
|
64
82
|
|
65
83
|
<script src="./renderer.js"></script>
|
66
84
|
|
@@ -71,3 +89,57 @@
|
|
71
89
|
</html>
|
72
90
|
|
73
91
|
```
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
```renderer.js
|
96
|
+
|
97
|
+
// This file is required by the index.html file and will
|
98
|
+
|
99
|
+
// be executed in the renderer process for that window.
|
100
|
+
|
101
|
+
// All of the Node.js APIs are available in this process.
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
// 追加
|
106
|
+
|
107
|
+
const fs = require('fs')
|
108
|
+
|
109
|
+
const path = require('path')
|
110
|
+
|
111
|
+
```
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
そして
|
116
|
+
|
117
|
+
```cmd
|
118
|
+
|
119
|
+
npx electron .
|
120
|
+
|
121
|
+
```
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
上記のコマンドを実行しElectronを実行すると以下のように開発者コンソールにエラーが表示されており、
|
126
|
+
|
127
|
+
エラーメッセージで検索をかけてもあまり参考になるような情報は得られませんでした。
|
128
|
+
|
129
|
+
```
|
130
|
+
|
131
|
+
Uncaught ReferenceError: require is not defined
|
132
|
+
|
133
|
+
at renderer.js:5
|
134
|
+
|
135
|
+
```
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
公式のクイックスタートの手順に従ってソースのコメント通りにAPIを追加しただけなのですが
|
140
|
+
|
141
|
+
なにか見当違いなことをしているのでしょうか。
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
ご意見頂けると幸いです。
|