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

Compilation issue with main kaoto-ui related to constants-browserify #133

Closed
apupier opened this issue Feb 20, 2023 · 0 comments · Fixed by #134
Closed

Compilation issue with main kaoto-ui related to constants-browserify #133

apupier opened this issue Feb 20, 2023 · 0 comments · Fixed by #134
Labels
Milestone

Comments

@apupier
Copy link
Member

apupier commented Feb 20, 2023

ERROR in ../kaoto-ui/dist/lib/store/settingsStore.js 2:0-55
Module not found: Error: Can't resolve 'constants' in '/home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/dist/lib/store'
Did you mean './constants'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "constants": require.resolve("constants-browserify") }'
	- install 'constants-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "constants": false }
resolve 'constants' in '/home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/dist/lib/store'
  Parsed request is a module
  using description file: /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/package.json (relative path: ./dist/lib/store)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/dist/lib/store/node_modules doesn't exist or is not a directory
      /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/dist/lib/node_modules doesn't exist or is not a directory
      /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/dist/node_modules doesn't exist or is not a directory
      looking for modules in /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/node_modules
        single file module
          using description file: /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/package.json (relative path: ./node_modules/constants)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/node_modules/constants doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/node_modules/constants.tsx doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/node_modules/constants.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/node_modules/constants.js doesn't exist
            .jsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/node_modules/constants.jsx doesn't exist
        /home/runner/work/vscode-kaoto/vscode-kaoto/kaoto-ui/node_modules/constants doesn't exist
      /home/runner/work/vscode-kaoto/vscode-kaoto/node_modules doesn't exist or is not a directory
      /home/runner/work/vscode-kaoto/node_modules doesn't exist or is not a directory
      /home/runner/work/node_modules doesn't exist or is not a directory
      /home/runner/node_modules doesn't exist or is not a directory
      /home/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
 @ ../kaoto-ui/dist/lib/store/index.js 6:0-32 6:0-32
 @ ../kaoto-ui/dist/lib/kogito-integration/KogitoEditorIntegrationProvider.js 4:0-103 16:38-54 17:51-74 18:39-70
 @ ../kaoto-ui/dist/lib/kogito-integration/index.js 4:0-50 4:0-50
 @ ./src/webview/KaotoEditorEnvelopeApp.ts 1:0-81 6:23-41
@apupier apupier added the task label Feb 20, 2023
@apupier apupier added this to the 0.3.0 milestone Feb 20, 2023
apupier added a commit to apupier/vscode-kaoto that referenced this issue Feb 20, 2023
required with latest version of Kaoto UI

fixes KaotoIO#133

Signed-off-by: Aurélien Pupier <[email protected]>
apupier added a commit that referenced this issue Feb 20, 2023
required with latest version of Kaoto UI

fixes #133

Signed-off-by: Aurélien Pupier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant