Use NPM install to report an error – operation not allowed

Original text: https://blog.csdn.net/weixin_41715295/article/details/79508104

The error – 4048 operation not allowed has been reported when NPM install is used these days. Many methods have been tried and finally the problem has been solved. Here are several methods summarized. First:  

I: permission issues

First, when we see operation not allowed, we can think of the permission problem, so at this time, we can run CMD as an administrator or directly open it by pressing the shortcut key win + X

2: dependency package error

As shown in the figure above, according to the error log, we can clearly see that the minimach version is too low and the dash dash error. As long as we install the two packages globally, the problem can be solved perfectly.  
when we install some scaffolds such as Vue cli or angular cli in NPM install or through NPM install, and then the construction project reports errors, we can correctly install the required dependency packages globally through error prompts.  
generally, in this case, we need to focus on the key word after operation not permitted and the following directory

III: NPM version problem

The latest version of NPM 5.4.0 lacks dependent packages when installing packages. In this case, we need to install a lower version of NPM: NPM I – G [email protected] (fill in the specified version you need here)


The above are some methods summarized by individuals according to their own situations. Of course, the focus is on looking at their own error log tips

Similar Posts: