不要直接使用mime了,要是使用可以这样: const MimeLookup = require('mime-lookup'); const mime = new MimeLookup(require('mime-db'));