I have a warning before runnig appium as DeprecationWarning. what is it?

Viewed 5882

Hiii,

I installed appium and when I run it there is a warning:

(node:20247) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/mjpeg-server/package.json' of './lib/mpegserver'. Please either fix that or report it to the module author (Use node --trace-deprecation ... to show where the warning was created)

and when I run node --trace-deprecation ... on my terminal it gives me back:

node:internal/modules/cjs/loader:944 throw err; ^

Error: Cannot find module '/home/X/...' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15) at Function.Module._load (node:internal/modules/cjs/loader:774:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

what's the problem here and how can I solve it?!

I'm using ubuntu 18.4. And node (v16.2.0)/ npm version(7.13.0).

3 Answers

It's not an error, it's a warning that mjpeg-server, a package you're using, needs updating.

You don't need to worry about it.

(The subsequent error is due to you literally running node --trace-deprecation ... without replacing ... with something else.)

Try to uninstall your html-webpack plugin and install the latest version or upgrade to the latest version for the fix.

It may be CLI outdated and the below one will list all deprecation

node --trace-deprecation ./node_modules/.bin/the_library_name_here 

Modify the 'main' field in package.json as follows:

"main": "./lib/mjpeg-server",

This can solve your problem.

Related