Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): DeprecationWarning in yarn_custom_checks #2956

Closed
outSH opened this issue Dec 19, 2023 · 1 comment · Fixed by #3309
Closed

fix(ci): DeprecationWarning in yarn_custom_checks #2956

outSH opened this issue Dec 19, 2023 · 1 comment · Fixed by #3309
Assignees
Labels
bug Something isn't working P4 Priority 4: Low Tests Anything related to tests be that automatic or manual, integration or unit, etc. Weaver Tasks related to the future of Cactus & Weaver together.

Comments

@outSH
Copy link
Contributor

outSH commented Dec 19, 2023

Describe the bug

There are several DeprecationWarning in weaver packages in yarn_custom_checks CI tests. There are few warnings in cactus-example-carbon-accounting-frontend but they are triggered by dependent packages, so I don't think we can fix them.

(node:2714) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/cacti/cacti/weaver/sdks/fabric/interoperation-node-sdk/package.json' of 'build/index.js'. Please either fix that or report it to the module author
    at tryPackage (node:internal/modules/cjs/loader:449:15)
    at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/cacti/cacti/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at resolveFileName (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:46:47)
    at _default (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/module-root.js:18:54)
    at loadModuleData (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/index.js:40:61)
    at discoverPropertyDep (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/check.js:106:33)
(node:2714) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/cacti/cacti/weaver/sdks/besu/node/package.json' of 'build/index.js'. Please either fix that or report it to the module author
    at tryPackage (node:internal/modules/cjs/loader:449:15)
    at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/cacti/cacti/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at resolveFileName (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:46:47)
    at _default (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/module-root.js:18:54)
    at loadModuleData (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/index.js:40:61)
    at discoverPropertyDep (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/check.js:106:33)
(node:2714) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/cacti/cacti/weaver/core/drivers/fabric-driver/node_modules/@hyperledger/cacti-weaver-sdk-fabric/package.json' of 'build/index.js'. Please either fix that or report it to the module author
    at tryPackage (node:internal/modules/cjs/loader:449:15)
    at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/cacti/cacti/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at resolveFileName (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:46:47)
    at _default (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/module-root.js:18:54)
    at loadModuleData (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/index.js:40:61)
    at discoverPropertyDep (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/check.js:106:33)
(node:2714) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/cacti/cacti/weaver/samples/fabric/fabric-cli/node_modules/@hyperledger/cacti-weaver-sdk-fabric/package.json' of 'build/index.js'. Please either fix that or report it to the module author
    at tryPackage (node:internal/modules/cjs/loader:449:15)
    at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/cacti/cacti/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at resolveFileName (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:46:47)
    at _default (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/module-root.js:18:54)
    at loadModuleData (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/index.js:40:61)
    at discoverPropertyDep (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/check.js:106:33)
(node:2714) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/cacti/cacti/weaver/samples/besu/besu-cli/node_modules/@hyperledger/cacti-weaver-sdk-besu/package.json' of 'build/index.js'. Please either fix that or report it to the module author
    at tryPackage (node:internal/modules/cjs/loader:449:15)
    at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/cacti/cacti/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at resolveFileName (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:46:47)
    at _default (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/module-root.js:18:54)
    at loadModuleData (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/index.js:40:61)
    at discoverPropertyDep (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/check.js:106:33)
(node:2714) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/cacti/cacti/examples/cactus-example-carbon-accounting-frontend/node_modules/@ionic-native/splash-screen/package.json' of 'bundle.js'. Please either fix that or report it to the module author
    at tryPackage (node:internal/modules/cjs/loader:449:15)
    at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/cacti/cacti/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at resolveFileName (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:46:47)
    at _default (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/module-root.js:18:54)
    at loadModuleData (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/index.js:40:61)
    at discoverPropertyDep (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/check.js:106:33)
(node:2714) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/cacti/cacti/examples/cactus-example-carbon-accounting-frontend/node_modules/@ionic-native/status-bar/package.json' of 'bundle.js'. Please either fix that or report it to the module author
    at tryPackage (node:internal/modules/cjs/loader:449:15)
    at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/cacti/cacti/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at resolveFileName (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:46:47)
    at _default (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/module-root.js:18:54)
    at loadModuleData (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/index.js:40:61)
    at discoverPropertyDep (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/check.js:106:33)
(node:2714) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/cacti/cacti/examples/cactus-example-supply-chain-frontend/node_modules/@ionic-native/splash-screen/package.json' of 'bundle.js'. Please either fix that or report it to the module author
    at tryPackage (node:internal/modules/cjs/loader:449:15)
    at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/cacti/cacti/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at resolveFileName (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:46:47)
    at _default (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/module-root.js:18:54)
    at loadModuleData (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/index.js:40:61)
    at discoverPropertyDep (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/check.js:106:33)
(node:2714) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/cacti/cacti/examples/cactus-example-supply-chain-frontend/node_modules/@ionic-native/status-bar/package.json' of 'bundle.js'. Please either fix that or report it to the module author
    at tryPackage (node:internal/modules/cjs/loader:449:15)
    at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/cacti/cacti/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at resolveFileName (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:46:47)
    at _default (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/module-root.js:18:54)
    at loadModuleData (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/index.js:40:61)
    at discoverPropertyDep (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/check.js:106:33)
(node:2714) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/cacti/cacti/weaver/core/identity-management/iin-agent/node_modules/@hyperledger/cacti-weaver-sdk-fabric/package.json' of 'build/index.js'. Please either fix that or report it to the module author
    at tryPackage (node:internal/modules/cjs/loader:449:15)
    at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/runner/work/cacti/cacti/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at resolveFileName (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/runner/work/cacti/cacti/node_modules/resolve-from/index.js:46:47)
    at _default (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/module-root.js:18:54)
    at loadModuleData (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/utils/index.js:40:61)
    at discoverPropertyDep (/home/runner/work/cacti/cacti/node_modules/depcheck/dist/check.js:106:33)

To Reproduce

See https://github.com/hyperledger/cacti/actions/workflows/ci.yaml / yarn_custom_checks for current status.

Expected behavior

Most warnings should be fixed

@outSH outSH added bug Something isn't working Tests Anything related to tests be that automatic or manual, integration or unit, etc. P4 Priority 4: Low Weaver Tasks related to the future of Cactus & Weaver together. labels Dec 19, 2023
@aldousalvarez
Copy link
Contributor

Hello @jagpreetsinghsasan I would like to work on this one. Thank you

@jagpreetsinghsasan jagpreetsinghsasan moved this from Todo to In Progress in Cacti_Scrum_Project_v2_Release Jun 4, 2024
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jun 11, 2024
Primary Changes
----------------
1. Updated the main field to use index.js to fix the Deprecation Warning

Fixes hyperledger-cacti#2956

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jun 11, 2024
Primary Changes
----------------
1.updated the main field to use index.js to fix the Deprecation Warning

Fixes hyperledger-cacti#2956

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jun 11, 2024
Primary Changes
----------------
1. Updated the main field to use index.js to fix the Deprecation Warning

Fixes hyperledger-cacti#2956

Signed-off-by: aldousalvarez <[email protected]>
aldousalvarez added a commit to aldousalvarez/cactus that referenced this issue Jun 11, 2024
Primary Changes
----------------
1. Updated the main field to use index.js to fix the Deprecation Warning

Fixes hyperledger-cacti#2956

Signed-off-by: aldousalvarez <[email protected]>
petermetz pushed a commit to aldousalvarez/cactus that referenced this issue Jul 5, 2024
Primary Changes
----------------
1. Updated the main field to use index.js to fix the Deprecation Warning

Fixes hyperledger-cacti#2956

Signed-off-by: aldousalvarez <[email protected]>
petermetz pushed a commit to aldousalvarez/cactus that referenced this issue Jul 5, 2024
Primary Changes
----------------
1. Updated the main field to use index.js to fix the Deprecation Warning

Peter's Fixes:
----------------
1. I fixed the file paths in the require statements to match the new location
after we've remapped the bundle location in the package.json files.

Fixes hyperledger-cacti#2956

Co-Authored-by: Peter Somogyvari <[email protected]>

Signed-off-by: aldousalvarez <[email protected]>
Signed-off-by: Peter Somogyvari <[email protected]>
@github-project-automation github-project-automation bot moved this from In Progress to Done in Cacti_Scrum_Project_v2_Release Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P4 Priority 4: Low Tests Anything related to tests be that automatic or manual, integration or unit, etc. Weaver Tasks related to the future of Cactus & Weaver together.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants