problems:
npm installation results in an error
Current State:
Download Node.js v12.19.0
(During installation, the specified destination C:\Program Files\nodejs\
I installed all the settings as default.)
From the command, navigate to C:\Program Files\nodejs\ and create npm init→package.json
cd to the file where package.json was created (C:\Program Files\nodejs\node_modules\npm)
So when I did the npm installation, I got the following error:
Does anyone know how to solve this problem?
I would appreciate it if you could let me know.
I look forward to your kind cooperation.
As @cubick commented on the error message, while running As a countermeasure, we will refer to these articles, including those introduced in the comments: Try it. "By the way, the ""Create Node.js Project"" introduced the following guidelines, which are not limited to Node.js/npm, but also for other programs." Also, when creating a directory, be careful not to include either a Japanese string or a blank in the path. Recently, I don't often encounter Japanese strings (full-width characters) and spaces, but I avoid them because they often cause unexpected problems. In addition, when creating and selecting folders/directories for work (unless explicitly covered by some instructions):npm install
from C:\Program Files\nodejs\node_modules\npm
, create the folder in the C:\Program Files\nodejs\node_modules\node_modules.code.
Create Node.js Project
npm Common Command Summary
Basic Usage for npm
When you are not allowed to do npm install
For example, C:\Windows, C:\Program Files, C:\Program Files (x86), C:\ProgramData and the folder under it, and the root folder for each drive, such as C:\
Alternatively, when you click on Explorer, "You do not have permission to access this folder. US>Click Continue to obtain permanent access to this folder (even if you have obtained access with it, you should not use it)
© 2024 OneMinuteCode. All rights reserved.