Deprecated dependencies
1.Newman Version 5.3.1 2. Linux / Mac 3. Using Newman as CLI 4. Always
Hi, if i install newman with npm, i always get some deprecated messages.
npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
At the moment, it is no problem, but soon I think it will be blocked by our security policies.
Is it possible to upgrade these dependencies?
Frendly regards.
Alex
can I work on this? Thanks.
I am experiencing the same issue. I tried to install newer version har-validator for example: @plotdb/[email protected] but it newman does not take it and still install old [email protected].
I run: #npm install -g newman [email protected] @plotdb/[email protected] #npm install -g [email protected]
And after installation i get: npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated [email protected]: Removed event-stream from gulp-header npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
Does anyone know if those dependencies can be upgraded ?
Experiencing the same behavior.
I am experiencing the same issue. I tried to install newer version har-validator for example: @plotdb/[email protected] but it newman does not take it and still install old [email protected].
I run: #npm install -g newman [email protected] @plotdb/[email protected] #npm install -g [email protected]
And after installation i get: npm WARN ...
Does anyone know if those dependencies can be upgraded?
You can override the "uuid" package to a later version, but overriding "har-validator" with "@plotdb/har-validator" will cause problems when running newman.
You can override dependencies in your package.json file...
"devDependencies": {
"newman": "^5.3.2"
},
"overrides": {
"uuid": "^7.0.0",
"har-validator": "@plotdb/har-validator"
}
However, overriding "har-validator" with "@plotdb/har-validator" will generate errors when running newman run, as shown below. (You can still override "uuid" as shown above, though.)
node:internal/modules/cjs/loader:959
throw err;
^
Error: Cannot find module 'har-validator'
Require stack:
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-request\lib\har.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-request\request.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-request\index.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-runtime\lib\requester\request-wrapper.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-runtime\lib\requester\requester.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-runtime\lib\requester\index.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-runtime\lib\runner\extensions\http-request.command.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-runtime\lib\runner\run.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-runtime\lib\runner\index.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-runtime\lib\index.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\postman-runtime\index.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\newman\lib\run\index.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\newman\lib\index.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\newman\index.js
- C:\Users\YourName\source\repos\postman-configs\node_modules\newman\bin\newman.js
at Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
at Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1022:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\YourName\source\repos\postman-configs\node_modules\postman-request\lib\har.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
at Module.load (node:internal/modules/cjs/loader:998:32)
at Module._load (node:internal/modules/cjs/loader:839:12)
at Module.require (node:internal/modules/cjs/loader:1022:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\YourName\source\repos\postman-configs\node_modules\postman-request\request.js:26:11)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
at Module.load (node:internal/modules/cjs/loader:998:32)
at Module._load (node:internal/modules/cjs/loader:839:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-request\\lib\\har.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-request\\request.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-request\\index.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-runtime\\lib\\requester\\request-wrapper.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-runtime\\lib\\requester\\requester.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-runtime\\lib\\requester\\index.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-runtime\\lib\\runner\\extensions\\http-request.command.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-runtime\\lib\\runner\\run.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-runtime\\lib\\runner\\index.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-runtime\\lib\\index.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\postman-runtime\\index.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\newman\\lib\\run\\index.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\newman\\lib\\index.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\newman\\index.js',
'C:\\Users\\YourName\\source\\repos\\postman-configs\\node_modules\\newman\\bin\\newman.js'
]
}
@JeffJacobson thank you for your response, are you maybe aware of any workaround which would not generate errors ?
@JeffJacobson thank you for your response, are you maybe aware of any workaround which would not generate errors ?
Sorry, I don't know of any workaround.
Also, when running newman run with the aforementioned "override" to the latest version of uuid, I get this warning:
(node:12380) DeprecationWarning: Deep requiring like `const uuidv4 = require('uuid/v4');` is deprecated as of [email protected]. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.
(Use `node --trace-deprecation ...` to show where the warning was created)
Looks like there's no way to avoid warnings until newman is updated to resolve these issues. ☹
It looks like the issues may be coming from the "postman-request" dependency rather than directly from this repo.
- There's already a pull request there to upgrade its uuid dependency to a newer version.
@JeffJacobson thank you for your insights :) It looks like we have to just wait until PR is completed.
These are coming from dependencies serialised-error and postman-request:
[email protected]
┬ [email protected]
└── [email protected]
┬ [email protected]
└── [email protected]