-
Notifications
You must be signed in to change notification settings - Fork 287
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
build(plugin-satp-hermes): dist/lib/knex/knexfile.ts not under rootDir #3708
Comments
Thank you, Peter! |
1. Moved the typescript knex sources into the appropriate directory to match the established patterns we use for building the code (./src/main/typescript/) This fixed the problem of the bundler not finding the knexfile sources. 2. Also refactored the runtime require calls of the knex files to be build-time import statements instead. This came with the benefit that we no longer require the linter to be turned off and also that compile time checks are in effect. In the future if we want to go back to importing the knex files dynamically we could do so by adding a parameter to the log repository constructor parameter object which could be holding the path to a knex file to be included at runtime. (though I would only do this if we have no other choice - by default we should always thrive to use the compiler and do as much at build time as possible). Fixes hyperledger-cacti#3708 Signed-off-by: Peter Somogyvari <[email protected]>
I encountered the same error initially when testing the command. However, after deleting the dist folder and building again, the error no longer occurred. It's possible that leftover files from previous builds were causing the issue. I also ran a git reset --hard on my folder to ensure everything was clean, and run it again. |
1. Moved the typescript knex sources into the appropriate directory to match the established patterns we use for building the code (./src/main/typescript/) This fixed the problem of the bundler not finding the knexfile sources. 2. Also refactored the runtime require calls of the knex files to be build-time import statements instead. This came with the benefit that we no longer require the linter to be turned off and also that compile time checks are in effect. In the future if we want to go back to importing the knex files dynamically we could do so by adding a parameter to the log repository constructor parameter object which could be holding the path to a knex file to be included at runtime. (though I would only do this if we have no other choice - by default we should always thrive to use the compiler and do as much at build time as possible). Fixes hyperledger-cacti#3708 Signed-off-by: Peter Somogyvari <[email protected]>
1. Moved the typescript knex sources into the appropriate directory to match the established patterns we use for building the code (./src/main/typescript/) This fixed the problem of the bundler not finding the knexfile sources. 2. Also refactored the runtime require calls of the knex files to be build-time import statements instead. This came with the benefit that we no longer require the linter to be turned off and also that compile time checks are in effect. In the future if we want to go back to importing the knex files dynamically we could do so by adding a parameter to the log repository constructor parameter object which could be holding the path to a knex file to be included at runtime. (though I would only do this if we have no other choice - by default we should always thrive to use the compiler and do as much at build time as possible). Fixes #3708 Signed-off-by: Peter Somogyvari <[email protected]>
Currently solved at satp-dev |
1. Moved the typescript knex sources into the appropriate directory to match the established patterns we use for building the code (./src/main/typescript/) This fixed the problem of the bundler not finding the knexfile sources. 2. Also refactored the runtime require calls of the knex files to be build-time import statements instead. This came with the benefit that we no longer require the linter to be turned off and also that compile time checks are in effect. In the future if we want to go back to importing the knex files dynamically we could do so by adding a parameter to the log repository constructor parameter object which could be holding the path to a knex file to be included at runtime. (though I would only do this if we have no other choice - by default we should always thrive to use the compiler and do as much at build time as possible). Fixes #3708 Signed-off-by: Peter Somogyvari <[email protected]>
1. Moved the typescript knex sources into the appropriate directory to match the established patterns we use for building the code (./src/main/typescript/) This fixed the problem of the bundler not finding the knexfile sources. 2. Also refactored the runtime require calls of the knex files to be build-time import statements instead. This came with the benefit that we no longer require the linter to be turned off and also that compile time checks are in effect. In the future if we want to go back to importing the knex files dynamically we could do so by adding a parameter to the log repository constructor parameter object which could be holding the path to a knex file to be included at runtime. (though I would only do this if we have no other choice - by default we should always thrive to use the compiler and do as much at build time as possible). Fixes #3708 Signed-off-by: Peter Somogyvari <[email protected]>
1. Moved the typescript knex sources into the appropriate directory to match the established patterns we use for building the code (./src/main/typescript/) This fixed the problem of the bundler not finding the knexfile sources. 2. Also refactored the runtime require calls of the knex files to be build-time import statements instead. This came with the benefit that we no longer require the linter to be turned off and also that compile time checks are in effect. In the future if we want to go back to importing the knex files dynamically we could do so by adding a parameter to the log repository constructor parameter object which could be holding the path to a knex file to be included at runtime. (though I would only do this if we have no other choice - by default we should always thrive to use the compiler and do as much at build time as possible). Fixes hyperledger-cacti#3708 Signed-off-by: Peter Somogyvari <[email protected]>
Description
Broken on both
main
andsatp-dev
cd packages/cactus-plugin-satp-hermes/ yarn ncc build ./dist/lib/main/typescript/plugin-satp-hermes-gateway-cli.js --minify --out=./dist/bundle/ncc/
The interesting parts from the logs that the command above will produce:
2024-12-18-satp-hermes-ncc-bundle.crash.log
Acceptance Criteria
cc: @RafaelAPB
The text was updated successfully, but these errors were encountered: