質問編集履歴

5

自分の名前が出ていたので

2022/03/05 22:31

投稿

shihominorth
shihominorth

スコア46

test CHANGED
File without changes
test CHANGED
@@ -57,16 +57,16 @@
57
57
  という表記があるので中身をみたところ、
58
58
 
59
59
  ```ここに言語を入力
60
- 314 error path /Users/kitajimashihomi/.npm-global/lib/node_modules/create-react-app
60
+ 314 error path /Users/[自分の名前]/.npm-global/lib/node_modules/create-react-app
61
61
  315 error errno -13
62
- 316 verbose Error: EACCES: permission denied, mkdir '/Users/kitajimashihomi/.npm-global/lib/node_modules/create-react-app'
62
+ 316 verbose Error: EACCES: permission denied, mkdir '/Users/[自分の名前]/.npm-global/lib/node_modules/create-react-app'
63
63
  317 error
64
64
  317 error Your cache folder contains root-owned files, due to a bug in
65
65
  317 error previous versions of npm which has since been addressed.
66
66
  ```
67
67
 
68
- という表記を見つけましたので[こちらの記事の解決方法1(https://qiita.com/Gaddict/items/8c76d92bd0adec2bfb6a)を参考にして
68
+ という表記を見つけましたので[こちらの記事の解決方法1](https://qiita.com/Gaddict/items/8c76d92bd0adec2bfb6a)を参考にして
69
- ```ここに言語を入力
69
+ ```
70
70
  sudo chmod 777 /Users/[自分の名前]/.npm-global/lib
71
71
  sudo chmod 777 /Users/[自分の名前]/.npm-global/lib/node_modules
72
72
  ```
@@ -76,7 +76,7 @@
76
76
  ```
77
77
  というエラーが出たので
78
78
  ```
79
- sudo chmod 777 /Users/kitajimashihomi/.npm-global/bin/create-react-app
79
+ sudo chmod 777 /Users/[自分の名前]/.npm-global/bin/create-react-app
80
80
  ```
81
81
 
82
82
  をやってみましたが今度は別の

4

権限をいくつかのディレクトリに与えた

2022/03/05 22:29

投稿

shihominorth
shihominorth

スコア46

test CHANGED
File without changes
test CHANGED
@@ -47,3 +47,43 @@
47
47
  - node -v
48
48
  v16.14.0
49
49
 
50
+ ### 追記
51
+
52
+ エラー文の下の方に
53
+ ```
54
+ npm ERR! A complete log of this run can be found in:
55
+ npm ERR! /Users/[自分の名前]/.npm/_logs/2022-03-05T22_05_16_550Z-debug-0.log
56
+ ```
57
+ という表記があるので中身をみたところ、
58
+
59
+ ```ここに言語を入力
60
+ 314 error path /Users/kitajimashihomi/.npm-global/lib/node_modules/create-react-app
61
+ 315 error errno -13
62
+ 316 verbose Error: EACCES: permission denied, mkdir '/Users/kitajimashihomi/.npm-global/lib/node_modules/create-react-app'
63
+ 317 error
64
+ 317 error Your cache folder contains root-owned files, due to a bug in
65
+ 317 error previous versions of npm which has since been addressed.
66
+ ```
67
+
68
+ という表記を見つけましたので[こちらの記事の解決方法1(https://qiita.com/Gaddict/items/8c76d92bd0adec2bfb6a)を参考にして
69
+ ```ここに言語を入力
70
+ sudo chmod 777 /Users/[自分の名前]/.npm-global/lib
71
+ sudo chmod 777 /Users/[自分の名前]/.npm-global/lib/node_modules
72
+ ```
73
+ また上記と同じような
74
+ ```
75
+ 422 verbose Error: EACCES: permission denied, symlink '../lib/node_modules/create-react-app/index.js' -> '/Users/[自分の名前]/.npm-global/bin/create-react-app'
76
+ ```
77
+ というエラーが出たので
78
+ ```
79
+ sudo chmod 777 /Users/kitajimashihomi/.npm-global/bin/create-react-app
80
+ ```
81
+
82
+ をやってみましたが今度は別の
83
+ ```ここに言語を入力
84
+ EACCES: permission denied, rename '/Users/[自分の名前]/.npm-global/lib/node_modules/npm' -> '/Users/kitajimashihomi/.npm-global/lib/node_modules/.npm-N9ngGUni'
85
+ ```
86
+ が出てきました。そもそも/Users/kitajimashihomi/.npm-global/lib/node_modulesには権限を与えたのにこのパス以下のファイル、ディレクトリには権限が与えられていないのでしょうか?
87
+
88
+ この後npx clear-npx-cache,をして npx create-react-app@5.0.0を実行してもエラーメッセージは変わらずです。
89
+

3

自分の名前が載っていたので

2022/03/05 22:03

投稿

shihominorth
shihominorth

スコア46

test CHANGED
File without changes
test CHANGED
@@ -32,7 +32,7 @@
32
32
 
33
33
  // こちらを叩いてもダメでした。
34
34
  npm ERR! To permanently fix this problem, please run:
35
- npm ERR! sudo chown -R 501:20 "/Users/kitajimashihomi/.npm"
35
+ npm ERR! sudo chown -R 501:20 "/Users/[自分の名前]/.npm"
36
36
  ```
37
37
 
38
38
  - npx clear-npx-cache

2

補足追加

2022/03/04 20:09

投稿

shihominorth
shihominorth

スコア46

test CHANGED
File without changes
test CHANGED
@@ -38,3 +38,12 @@
38
38
  - npx clear-npx-cache
39
39
 
40
40
 
41
+
42
+ ### 補足情報(FW/ツールのバージョンなど)
43
+
44
+ - mac
45
+ - npm -v
46
+ 8.3.1
47
+ - node -v
48
+ v16.14.0
49
+

1

間違いを修正

2022/03/04 19:42

投稿

shihominorth
shihominorth

スコア46

test CHANGED
File without changes
test CHANGED
@@ -33,7 +33,7 @@
33
33
  // こちらを叩いてもダメでした。
34
34
  npm ERR! To permanently fix this problem, please run:
35
35
  npm ERR! sudo chown -R 501:20 "/Users/kitajimashihomi/.npm"
36
- ``
36
+ ```
37
37
 
38
38
  - npx clear-npx-cache
39
39