You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 4, 2022. It is now read-only.
Context
I am working with webpack (4.43.0) to create a bundle for which the npm module @dashevo/dpp@0.12.1 is a dependency.
Webpack is unable to build successfully due to the errors below. On investigation, the require() statements for json schema files do not specify the file extension in the path. Adding the .json extension appears to resolve the issue
I will investigate whether I am able to fully resolve this issue and provide a PR if that is the case.
My assumption is that the library is able to build under other circumstances and this is a webpack issue. Webpack does not require a JSON file loader but there may be a configuration issue as to why files cannot be imported without the extension. There doesn't appear any special configuration related to .json imports in the webpack configuration for the library
Error output from Webpack:
ERROR in ./node_modules/@dashevo/dpp/lib/document/stateTransition/validation/structure/validateDocumentsBatchTransitionStructureFactory.js
Module not found: Error: Can't resolve '../../../../../schema/document/stateTransition/documentTransition/base' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/document/stateTransition/validation/structure'
@ ./node_modules/@dashevo/dpp/lib/document/stateTransition/validation/structure/validateDocumentsBatchTransitionStructureFactory.js 12:29-110
@ ./node_modules/@dashevo/dpp/lib/stateTransition/StateTransitionFacade.js
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
ERROR in ./node_modules/@dashevo/dpp/lib/document/stateTransition/validation/structure/validateDocumentsBatchTransitionStructureFactory.js
Module not found: Error: Can't resolve '../../../../../schema/document/stateTransition/documentTransition/create' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/document/stateTransition/validation/structure'
@ ./node_modules/@dashevo/dpp/lib/document/stateTransition/validation/structure/validateDocumentsBatchTransitionStructureFactory.js 13:31-114
@ ./node_modules/@dashevo/dpp/lib/stateTransition/StateTransitionFacade.js
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
ERROR in ./node_modules/@dashevo/dpp/lib/document/stateTransition/validation/structure/validateDocumentsBatchTransitionStructureFactory.js
Module not found: Error: Can't resolve '../../../../../schema/document/stateTransition/documentTransition/replace' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/document/stateTransition/validation/structure'
@ ./node_modules/@dashevo/dpp/lib/document/stateTransition/validation/structure/validateDocumentsBatchTransitionStructureFactory.js 14:32-116
@ ./node_modules/@dashevo/dpp/lib/stateTransition/StateTransitionFacade.js
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
ERROR in ./node_modules/@dashevo/dpp/lib/identity/validation/validateIdentityFactory.js
Module not found: Error: Can't resolve '../../../schema/identity/identity' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/identity/validation'
@ ./node_modules/@dashevo/dpp/lib/identity/validation/validateIdentityFactory.js 1:23-67
@ ./node_modules/@dashevo/dpp/lib/identity/IdentityFacade.js
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
ERROR in ./node_modules/@dashevo/dpp/lib/stateTransition/validation/validateStateTransitionStructureFactory.js
Module not found: Error: Can't resolve '../../../schema/stateTransition/stateTransitionBase' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/stateTransition/validation'
@ ./node_modules/@dashevo/dpp/lib/stateTransition/validation/validateStateTransitionStructureFactory.js 12:19-81
@ ./node_modules/@dashevo/dpp/lib/stateTransition/StateTransitionFacade.js
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
ERROR in ./node_modules/@dashevo/dpp/lib/validation/JsonSchemaValidator.js
Module not found: Error: Can't resolve '../../schema/dataContract/dataContractMeta' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/validation'
@ ./node_modules/@dashevo/dpp/lib/validation/JsonSchemaValidator.js 1:31-84
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
ERROR in ./node_modules/@dashevo/dpp/lib/stateTransition/StateTransitionFacade.js
Module not found: Error: Can't resolve '../../schema/dataContract/stateTransition/dataContractCreate' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/stateTransition'
@ ./node_modules/@dashevo/dpp/lib/stateTransition/StateTransitionFacade.js 12:43-114
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
ERROR in ./node_modules/@dashevo/dpp/lib/dataContract/validateDataContractFactory.js
Module not found: Error: Can't resolve '../../schema/document/documentBase' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/dataContract'
@ ./node_modules/@dashevo/dpp/lib/dataContract/validateDataContractFactory.js 6:27-72
@ ./node_modules/@dashevo/dpp/lib/dataContract/DataContractFacade.js
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
ERROR in ./node_modules/@dashevo/dpp/lib/document/validateDocumentFactory.js
Module not found: Error: Can't resolve '../../schema/document/documentBase' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/document'
@ ./node_modules/@dashevo/dpp/lib/document/validateDocumentFactory.js 2:27-72
@ ./node_modules/@dashevo/dpp/lib/document/DocumentFacade.js
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
ERROR in ./node_modules/@dashevo/dpp/lib/stateTransition/StateTransitionFacade.js
Module not found: Error: Can't resolve '../../schema/document/stateTransition/documentsBatch' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/stateTransition'
@ ./node_modules/@dashevo/dpp/lib/stateTransition/StateTransitionFacade.js 13:39-102
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
ERROR in ./node_modules/@dashevo/dpp/lib/stateTransition/StateTransitionFacade.js
Module not found: Error: Can't resolve '../../schema/identity/stateTransition/identityCreate' in '/home/nigel/Dev/dashmachine-crypto/node_modules/@dashevo/dpp/lib/stateTransition'
@ ./node_modules/@dashevo/dpp/lib/stateTransition/StateTransitionFacade.js 14:39-102
@ ./node_modules/@dashevo/dpp/lib/DashPlatformProtocol.js
@ ./src/dashmachine-crypto.js
@ multi ./src/dashmachine-crypto.js
Context
I am working with webpack (4.43.0) to create a bundle for which the npm module @dashevo/dpp@0.12.1 is a dependency.
Webpack is unable to build successfully due to the errors below. On investigation, the require() statements for json schema files do not specify the file extension in the path. Adding the .json extension appears to resolve the issue
I will investigate whether I am able to fully resolve this issue and provide a PR if that is the case.
My assumption is that the library is able to build under other circumstances and this is a webpack issue. Webpack does not require a JSON file loader but there may be a configuration issue as to why files cannot be imported without the extension. There doesn't appear any special configuration related to .json imports in the webpack configuration for the library
Error output from Webpack: