我有一个在Windows上创建的项目。移至macOS并尝试安装并运行它之后,出现以下错误:
date
我正在使用以下依赖项:
Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/beygel/ITECH/Projects/Moovz-Server/stats/node_modules/dynamodb/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/beygel/ITECH/Projects/Moovz-Server/stats/node_modules/dynamodb/node_modules/bunyan/lib/bunyan.js:34:22)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32) code: 'MODULE_NOT_FOUND'
系统信息:
答案 0 :(得分:3)
我通过运行rm -rf node_modules
,然后在我的依赖项中将npm i --no-optional
与dtrace-provider
一起运行来消除此错误。它的版本为0.8.7
。
答案 1 :(得分:0)
当我运行npm rebuild dtrace-provider