npm 安装文件 运行报错 %1 is not a valid Win32 application

Posted ypm_wbg

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了npm 安装文件 运行报错 %1 is not a valid Win32 application相关的知识,希望对你有一定的参考价值。

安装了那个模板出了错报这样的错误 “%1 is not a valid Win32 application”

你就除那个模板新安装。

如下例: 

运行 

npm install -g @angular/cli

报以下错误

Binary has a problem: Error: %1 is not a valid Win32 application.
\?C:UsersAdministratorAppDataRoaming
pm
ode_modules@angularcli
ode_modules
ode-sassvendorwin32-x64-48inding.node
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at module.exports (C:UsersAdministratorAppDataRoaming
pm
ode_modules@angularcli
ode_modules
ode-sasslibinding.js:19:10)
    at Object.<anonymous> (C:UsersAdministratorAppDataRoaming
pm
ode_modules@angularcli
ode_modules
ode-sasslibindex.js:14:35)
    at Module._compile (module.js:570:32)
Building the binary locally

解决方法

npm rm -g @angular/cli  

npm install -g @angular/cli

以上是关于npm 安装文件 运行报错 %1 is not a valid Win32 application的主要内容,如果未能解决你的问题,请参考以下文章

blucesun 解决npm报错:Module build failed: TypeError: this.getResolve is not a function

初始化vue项目,报错This is probably not a problem with npm,there is likely additional logging output above(示

npm报错This is probably not a problem with npm. There is likely additional logging

npm ERR! This is related to npm not being able to find a file.

ERROR: npm is known not to run on Node.js v10.16.0

ERROR: npm is known not to run on Node.js v10.16.0