Vue creates a project error: command failed: npm install --loglevel error; npm ERR! Invalid dependency type requested

When vue create my-demo creates a vue project, the error is as follows:
command failed: npm install --loglevel error;
npm ERR!Invalid dependency type requested: alias

After Baidu found the cause of the problem:

I am using the older version 10.1.3 of nodejs, and the npm it carries is version 6.4.3; when installing project dependencies, I use the command to report an error; finally, Google found that
npm with a lower version of alias does not support it. It must be version 6.9 or higher

solution:

$ npm -g install npm@6.9.0

I solved it by directly upgrading the npm version. This is the problem and solution encountered by other bloggers

おすすめ

転載: blog.csdn.net/i_am_a_div/article/details/131809608