我的文件中有一行:const vogels = require('vogels');
但是,每当我尝试运行该文件时,都会出现以下错误:
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
at Function.Module._load (internal/modules/cjs/loader.js:497:25)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/neilshweky/Dropbox/School 2018-2019/NETS 212/VMF_Shared_Folder/G48/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/default/DTraceProviderBindings'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
at Function.Module._load (internal/modules/cjs/loader.js:497:25)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/neilshweky/Dropbox/School 2018-2019/NETS 212/VMF_Shared_Folder/G48/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/Debug/DTraceProviderBindings'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
at Function.Module._load (internal/modules/cjs/loader.js:497:25)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/neilshweky/Dropbox/School 2018-2019/NETS 212/VMF_Shared_Folder/G48/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3) code: 'MODULE_NOT_FOUND' }
这是我的 package.json:
{
"name": "name",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "MY_URL"
},
"author": "",
"license": "ISC",
"dependencies": {
"async": "^2.6.1",
"aws-sdk": "^2.358.0",
"body-parser": "^1.18.3",
"cookie-parser": "^1.4.3",
"dtrace-provider": "^0.8.7",
"ejs": "^2.6.1",
"express": "^4.16.4",
"express-session": "^1.15.6",
"lodash": "^4.17.11",
"lru-cache": "^4.1.3",
"vogels": "^2.2.0"
}
}
我不确定为什么会发生这个错误,因为我所做的只是需要一个我下载的包(通过 npm install)。我已经浏览了我能找到的大部分内容,但没有找到答案。有任何想法吗?