expressJs中的调试错误

时间:2019-01-07 16:10:08

标签: javascript express mysqli

我正在尝试使用Visual Studio Code调试器,但是在启动时崩溃,当我使用nodemon运行服务器时,它运行得很好

我正在使用MySql数据库。我试图再次安装该模块,但不能。

此行的错误发生在loaders.js中:mod = getInternalBinding(module)

let internalBinding;
  {
    const bindingObj = ObjectCreate(null);
    internalBinding = function internalBinding(module) {
      let mod = bindingObj[module];
      if (typeof mod !== 'object') {
        try {
          mod = getInternalBinding(module);
        } catch {
          // v10.x only: Fall back to `process.binding()`,
          // to avoid future merge conflicts when backporting changes that use
          // `internalBinding()` to v10.x.
          mod = process.binding(module);
        }
        bindingObj[module] = mod;
        moduleLoadList.push(`Internal Binding ${module}`);
      }
      return mod;
    };
  }

Exception has occurred: Error
Error: No such module: http_parser.   
    at internalBinding (internal/bootstrap/loaders.js:104:1`enter code here`7).   
    at _http_client.js:27:24.   
    at NativeModule.compile (internal/bootstrap/loaders.js:362:7).   
    at NativeModule.require (internal/bootstrap/loaders.js:174:18).   
    at http.js:25:27.   
    at NativeModule.compile (internal/bootstrap/loaders.js:362:7).   (internal/bootstrap/loaders.js:174:18)    
    at Function.Module._load (internal/modules/cjs/loader.js:517:25).  
    at Module.require (internal/modules/cjs/loader.js:637:17)   
    at require (internal/modules/cjs/helpers.js:22:18)

1 个答案:

答案 0 :(得分:0)

在Visual Studio代码中,转到“调试”视图,在底部的一个断点部分,只需取消选中“所有异常”并取消选中“未捕获的异常”。