質問編集履歴

1

エラーやnode.jsについて

2021/12/07 14:59

投稿

ttt.fff
ttt.fff

スコア0

test CHANGED
File without changes
test CHANGED
@@ -2,11 +2,13 @@
2
2
 
3
3
 
4
4
 
5
- プログラミング初心者です。業務で少しUBUNTU(Linux)を使用しており、プログラミングに興味が出てきて勉強しようとGOを学ぶ環境を作ろうと思ったのですが、「npm」のインストールで以下のエラーが発生致します。
5
+ プログラミング初心者です。業務で少しUBUNTU(Linux)を使用しており、プログラミングに興味が出てきて勉強しようとGOを学ぶ環境を作ろうと思ったのですが、「npm」のインストールで以下のエラーが発生致します。node.jsをインストールする経緯になったのは、某プログラミングサイトでGOの環境構築する際、書き込むエディタにターミナルを表記させるのに必要みたいです。
6
+
6
-
7
+ 階層移動した後
8
+
7
-
9
+ npm install
10
+
8
-
11
+ を行っていたのですが動画通りにはうまくいきませんでした。
9
-
10
12
 
11
13
 
12
14
 
@@ -18,27 +20,183 @@
18
20
 
19
21
  エラーメッセージ
20
22
 
21
- ~ % npm install
22
-
23
- npm ERR! code ENOENT
24
-
25
- npm ERR! syscall open
26
-
27
- npm ERR! path /Users/■■■/package.json
28
-
29
- npm ERR! errno -2
30
-
31
- npm ERR! enoent ENOENT: no such file or directory, open '/Users/■■■/package.json'
32
-
33
- npm ERR! enoent This is related to npm not being able to find a file.
34
-
35
- npm ERR! enoent
23
+ npm install
24
+
25
+ npm ERR! code 1
26
+
27
+ npm ERR! path /Users/■/.atom/packages/terminal-plus/node_modules/pty.js
28
+
29
+ npm ERR! command failed
30
+
31
+ npm ERR! command sh -c node-gyp rebuild
32
+
33
+ npm ERR! gyp info it worked if it ends with ok
34
+
35
+ npm ERR! gyp info using node-gyp@8.4.1
36
+
37
+ npm ERR! gyp info using node@16.13.0 | darwin | x64
38
+
39
+ npm ERR! gyp info find Python using Python version 3.8.2 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
40
+
41
+ npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
42
+
43
+ npm ERR! gyp info spawn args [
44
+
45
+ npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
46
+
47
+ npm ERR! gyp info spawn args 'binding.gyp',
48
+
49
+ npm ERR! gyp info spawn args '-f',
50
+
51
+ npm ERR! gyp info spawn args 'make',
52
+
53
+ npm ERR! gyp info spawn args '-I',
54
+
55
+ npm ERR! gyp info spawn args '/Users/■/.atom/packages/terminal-plus/node_modules/pty.js/build/config.gypi',
56
+
57
+ npm ERR! gyp info spawn args '-I',
58
+
59
+ npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
60
+
61
+ npm ERR! gyp info spawn args '-I',
62
+
63
+ npm ERR! gyp info spawn args '/Users/■/Library/Caches/node-gyp/16.13.0/include/node/common.gypi',
64
+
65
+ npm ERR! gyp info spawn args '-Dlibrary=shared_library',
66
+
67
+ npm ERR! gyp info spawn args '-Dvisibility=default',
68
+
69
+ npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/■/Library/Caches/node-gyp/16.13.0',
70
+
71
+ npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
72
+
73
+ npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/■/Library/Caches/node-gyp/16.13.0/<(target_arch)/node.lib',
74
+
75
+ npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/■/.atom/packages/terminal-plus/node_modules/pty.js',
76
+
77
+ npm ERR! gyp info spawn args '-Dnode_engine=v8',
78
+
79
+ npm ERR! gyp info spawn args '--depth=.',
80
+
81
+ npm ERR! gyp info spawn args '--no-parallel',
82
+
83
+ npm ERR! gyp info spawn args '--generator-output',
84
+
85
+ npm ERR! gyp info spawn args 'build',
86
+
87
+ npm ERR! gyp info spawn args '-Goutput_dir=.'
88
+
89
+ npm ERR! gyp info spawn args ]
90
+
91
+ npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
92
+
93
+ npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
94
+
95
+ npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
96
+
97
+ npm ERR!
98
+
99
+ npm ERR!
100
+
101
+ npm ERR!
102
+
103
+ npm ERR! Traceback (most recent call last):
104
+
105
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1502, in XcodeVersion
106
+
107
+ npm ERR! version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
108
+
109
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1563, in GetStdoutQuiet
110
+
111
+ npm ERR! raise GypError("Error %d running %s" % (job.returncode, cmdlist[0]))
112
+
113
+ npm ERR! gyp.common.GypError: Error 1 running xcodebuild
114
+
115
+ npm ERR!
116
+
117
+ npm ERR! During handling of the above exception, another exception occurred:
118
+
119
+ npm ERR!
120
+
121
+ npm ERR! Traceback (most recent call last):
122
+
123
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 45, in <module>
124
+
125
+ npm ERR! sys.exit(gyp.script_main())
126
+
127
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in script_main
128
+
129
+ npm ERR! return main(sys.argv[1:])
130
+
131
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 654, in main
132
+
133
+ npm ERR! return gyp_main(args)
134
+
135
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 639, in gyp_main
136
+
137
+ npm ERR! generator.GenerateOutput(flat_list, targets, data, params)
138
+
139
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2455, in GenerateOutput
140
+
141
+ npm ERR! writer.Write(
142
+
143
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 830, in Write
144
+
145
+ npm ERR! self.WriteSources(
146
+
147
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1305, in WriteSources
148
+
149
+ npm ERR! cflags = self.xcode_settings.GetCflags(
150
+
151
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 662, in GetCflags
152
+
153
+ npm ERR! archs = self.GetActiveArchs(self.configname)
154
+
155
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 512, in GetActiveArchs
156
+
157
+ npm ERR! xcode_archs_default = GetXcodeArchsDefault()
158
+
159
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 119, in GetXcodeArchsDefault
160
+
161
+ npm ERR! xcode_version, _ = XcodeVersion()
162
+
163
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1513, in XcodeVersion
164
+
165
+ npm ERR! version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
166
+
167
+ npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1551, in CLTVersion
168
+
169
+ npm ERR! return re.search(regex, output).groupdict()["version"]
170
+
171
+ npm ERR! AttributeError: 'NoneType' object has no attribute 'groupdict'
172
+
173
+ npm ERR! gyp ERR! configure error
174
+
175
+ npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
176
+
177
+ npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
178
+
179
+ npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
180
+
181
+ npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
182
+
183
+ npm ERR! gyp ERR! System Darwin 19.6.0
184
+
185
+ npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
186
+
187
+ npm ERR! gyp ERR! cwd /Users/■/.atom/packages/terminal-plus/node_modules/pty.js
188
+
189
+ npm ERR! gyp ERR! node -v v16.13.0
190
+
191
+ npm ERR! gyp ERR! node-gyp -v v8.4.1
192
+
193
+ npm ERR! gyp ERR! not ok
36
194
 
37
195
 
38
196
 
39
197
  npm ERR! A complete log of this run can be found in:
40
198
 
41
- npm ERR! /Users/■■■/.npm/_logs/2021-12-06T14_49_30_039Z-debug-0.log
199
+ npm ERR! /Users/■/.npm/_logs/2021-12-07T14_53_40_766Z-debug-0.log
42
200
 
43
201
 
44
202
 
@@ -128,6 +286,8 @@
128
286
 
129
287
 
130
288
 
289
+ err のメッセージを検索しQiitaを参考に対処してみたのですが上記のエラーは解決できませんでした。
290
+
131
291
 
132
292
 
133
293
  全くの初心者で拙い部分もございますが、