npm - 错误:找不到指定的过程 [英] npm - Error: The specified procedure could not be found

查看:104
本文介绍了npm - 错误:找不到指定的过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:

module.js:347' 对于模块 ' + JSON.stringify(this.id));^错误:找不到指定的过程.c:\Users\Artur\workspace\xxx\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64\binding.node在错误(本机)在 Module.load (module.js:355:32)在 Function.Module._load (module.js:310:12)在 Module.require (module.js:365:17)在要求 (module.js:384:17)在对象<匿名>(c:\Users\Artur\workspace\xxx\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:211:15)在 Module._compile (module.js:460:26)在 Object.Module._extensions..js (module.js:478:10)在 Module.load (module.js:355:32)在 Function.Module._load (module.js:310:12)

系统:

  • 操作系统:Windows 8.1(64 位)
  • 节点:v0.12.0
  • npm:2.5.1

背景:

昨天我试图开始一个新项目.并尝试使用 yeoman 生成器 generator-gulp-angular 并得到了一堆视觉基本错误.所以我安装了 Microsoft Windows SDK 和微软的一堆其他东西.所以现在我在我安装的应用程序列表中有很多 Microsoft 条目,当我看到这些时我迷路了:

这些可能与问题有关:Microsoft Visual C++ x64 库Microsoft Visual C++ x86 库Microsoft Visual C++ 2005 可再发行组件Microsoft Visual C++ 2005 可再发行组件Microsoft Visual C++ 2005 可再发行组件Microsoft Visual C++ 2005 可再发行组件 (x64)Microsoft Visual C++ 2005 可再发行组件 (x64)Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.4148Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4148Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4974Microsoft Visual C++ 2010 x64 Redistributable - 10.0.40219Microsoft Visual C++ 2010 Express - ENUMicrosoft Visual C++ 2012 x64 附加运行时 - 11.0.61030Microsoft Visual C++ 2012 x64 最低运行时间 - 11.0.61030Microsoft Visual C++ 2012 x86 附加运行时 - 11.0.61030Microsoft Visual C++ 2012 x86 最低运行时间 - 11.0.61030Microsoft Visual C++ 2013 32 位编译器 - ENU 资源Microsoft Visual C++ 2013 核心库Microsoft Visual C++ 2013 x64 附加运行时 - 12.0.21005Microsoft Visual C++ 2013 x64 调试运行时 - 12.0.21005Microsoft Visual C++ 2013 x64 最低运行时间 - 12.0.21005Microsoft Visual C++ 2013 x86 附加运行时 - 12.0.21005Microsoft Visual C++ 2013 x86 调试运行时 - 12.0.21005Microsoft Visual C++ 2013 x86 最低运行时间 - 12.0.21005Microsoft Visual C++ 2013 x86-x64 编译器Microsoft .NET Framework 2.0 SDK (x64) - ENUMicrosoft .NET Framework 4 多目标包Microsoft .NET Framework 4.5 多目标包微软 .NET 框架 4.5 SDKMicrosoft .NET Framework 4.5.1 多目标包Microsoft .NET Framework 4.5.1 多目标包 (ENU)微软 .NET 框架 4.5.1 SDK

我不知道我真正需要/不需要什么,或者是否有任何冲突.

昨天我没有得到任何工作,所以我就在那里完成了.

所以今天我发现我有一个旧版本的npm(1.4.28)并升级到2.5.1版本.我刚刚从 nodejs.org 下载了一个新的 x64 安装程序.

在那之后,一切都被打破了.我什至无法再运行 gulp serve 来启动我现有的/正在运行的应用程序.几个小时我试图下载/修复/卸载/安装 Windows SDKnodejs 等.尝试了一堆我仍然不完全理解的命令,我仍然丢失的.

我尝试过的几件事:

  • npm 缓存清理
  • 删除 node_modules 文件夹并运行 npm install
  • 尝试使用 node-gyp
  • 找到的一些命令
  • 尝试将 msvs_version 属性设置为 something
  • 重启

这个错误让我觉得某种编译器有问题.但我不知道到底发生了什么.所以我试图了解问题的原因是什么?接下来我应该尝试什么来修复错误?

如果需要任何其他信息,请告诉我.

解决方案

编辑(2015 年 4 月 2 日):
Node-sass 已经解决了这个问题.您可以安全地使用 Node v0.12,只需确保安装最新版本的 Node-sass 并更新您的本地和全球版本的 Gulp (https://github.com/gulpjs/gulp/issues/873).我会将原始回复保留在下方以供存档.


卸载 Node v0.12 并安装 Node v0.10.28

http://nodejs.org/dist/v0.10.28/>

您需要 .msi 安装程序

这为我解决了问题.

显然这是 node-sass 的一个问题,在更新之前不会修复:https://github.com/sass/node-sass/issues/653

Error:

module.js:347
        ' for module ' + JSON.stringify(this.id));
                       ^
Error: The specified procedure could not be found.
c:\Users\Artur\workspace\xxx\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64\binding.node
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (c:\Users\Artur\workspace\xxx\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:211:15)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

System:

  • OS: Windows 8.1 (64-bit)
  • node: v0.12.0
  • npm: 2.5.1

Background:

Yesterday I was trying to start a new project. And tried to use yeoman generator generator-gulp-angular and got a bunch of visual basic errors. So I installed Microsoft Windows SDK and a bunch of other stuff from Microsoft. So now I have a lot of Microsoft entries in my installed applications listing and I'm lost when I look at these:

These might be relevant for the problem:

Microsoft Visual C++  x64 Libraries
Microsoft Visual C++  x86 Libraries
Microsoft Visual C++ 2005 Redistributable
Microsoft Visual C++ 2005 Redistributable
Microsoft Visual C++ 2005 Redistributable
Microsoft Visual C++ 2005 Redistributable (x64)
Microsoft Visual C++ 2005 Redistributable (x64)
Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.4148
Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4148
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4974
Microsoft Visual C++ 2010  x64 Redistributable - 10.0.40219
Microsoft Visual C++ 2010 Express - ENU
Microsoft Visual C++ 2012 x64 Additional Runtime - 11.0.61030
Microsoft Visual C++ 2012 x64 Minimum Runtime - 11.0.61030
Microsoft Visual C++ 2012 x86 Additional Runtime - 11.0.61030
Microsoft Visual C++ 2012 x86 Minimum Runtime - 11.0.61030
Microsoft Visual C++ 2013 32bit Compilers - ENU Resources
Microsoft Visual C++ 2013 Core Libraries
Microsoft Visual C++ 2013 x64 Additional Runtime - 12.0.21005
Microsoft Visual C++ 2013 x64 Debug Runtime - 12.0.21005
Microsoft Visual C++ 2013 x64 Minimum Runtime - 12.0.21005
Microsoft Visual C++ 2013 x86 Additional Runtime - 12.0.21005
Microsoft Visual C++ 2013 x86 Debug Runtime - 12.0.21005
Microsoft Visual C++ 2013 x86 Minimum Runtime - 12.0.21005
Microsoft Visual C++ 2013 x86-x64 Compilers

Microsoft .NET Framework 2.0 SDK (x64) - ENU
Microsoft .NET Framework 4 Multi-Targeting Pack
Microsoft .NET Framework 4.5 Multi-Targeting Pack
Microsoft .NET Framework 4.5 SDK
Microsoft .NET Framework 4.5.1 Multi-Targeting Pack
Microsoft .NET Framework 4.5.1 Multi-Targeting Pack (ENU)
Microsoft .NET Framework 4.5.1 SDK

I have no idea what I really need/don't need or if anything is conflicting.

I didn't get anything to work yesterday so I finished right there.

So today I found out that I had an old version of npm (1.4.28) and upgraded it to version 2.5.1. I just downloaded a new x64 installer from nodejs.org.

After that everything was broken. I can't even run gulp serve anymore to launch my existing/working application. For hours I tried to download/repair/uninstall/install Windows SDK, nodejs etc. Tried a bunch of commands which I still don't fully understand and I'm still lost.

Few things from the top of my head which I tried:

  • npm cache clean
  • deleted node_modules folder and ran npm install
  • tried some commands I found with node-gyp
  • tried to set the msvs_version attribute to something
  • restart

The error makes me think that something is wrong with some kind of a compiler. But I have no idea what's really going on. So I'm trying to understand what could be the cause of the problem? What should I try next to fix the error?

If any addition information is needed let me know.

解决方案

EDIT (APRIL 2ND, 2015):
Node-sass has since fixed the issue. You can safely use Node v0.12, just make sure to install the latest version of Node-sass and also update your local AND global version of Gulp (https://github.com/gulpjs/gulp/issues/873). I'll leave the original response below for archiving purposes.


Uninstall Node v0.12 and install Node v0.10.28

http://nodejs.org/dist/v0.10.28/

You'll want the .msi installer

That fixed the issue for me.

Apparently it's an issue with node-sass that won't be fixed until they update: https://github.com/sass/node-sass/issues/653

这篇关于npm - 错误:找不到指定的过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆