module.js:338 throw err in node.js

前端 未结 6 549
陌清茗
陌清茗 2021-02-08 01:31

I\'m using ubuntu and I\'m trying to run a script using nodejs and i\'m getting this error.

/home/bebz/Documents/test# node server.js
module.js:338
throw err;
           


        
6条回答
  •  感情败类
    2021-02-08 01:55

    It seems like the script has an unmet dependency - meaning you have to install the module "merge-descriptors" first.

    It also seems like the script is using "express" (and "merge-descriptors" actually looks like a dependency of "express") - because this didn't throw an error some dependencies seem to be installed already.

    So you could try to install the missing ones via npm install or npm update.

    Update: According to npmjs.org "merge-descriptors" is an dependency of "express". Looking at your stacktrace shows that you have "express" installed globally - so you should try npm update -g

    If that doesn't solve your problem you should have a look at this question.

提交回复
热议问题