Troubleshooting

While running the B2B Platform build process, you may encounter environment-specific issues. Below are the most common errors and their solutions.

ModuleNotFoundError: 'prosemirror' or 'TIPTAP'

[webpack-cli] ModuleNotFoundError: Error: Can't resolve 'prosemirror-keymap' ...

This error typically occurs when certain peer dependencies required by the Tiptap editor are not correctly resolved during the automated build.

Manually install the missing Prosemirror modules within the core plugin directory:

  1. Navigate to: custom/plugins/b2bsellerscore/src/Resources/app/b2b_platform

  2. Run the following command:

    npm i prosemirror-schema-list prosemirror-history prosemirror-dropcursor prosemirror-gapcursor prosemirror-keymap prosemirror-commands

Alternative (Version Conflict): If the error persists, ensure you are using a compatible Node.js version. If using NVM, you can switch versions:

nvm install 16.15.1 && nvm use 16.15.1

ReferenceError: B2bPlatform is not defined

Uncaught ReferenceError: B2bPlatform is not defined

This error appears in the browser console when the platform's core JavaScript assets failed to compile or were not correctly loaded.

Trigger a fresh build of the B2B assets to ensure the global B2bPlatform object is properly initialized and exported:

Build the B2B Platformchevron-right

Conflict Check: If a rebuild does not resolve the issue, ensure that no third-party plugins or custom individualizations are interfering with the B2B platform. Common culprits include:

  • HTML Minifiers: These can accidentally strip out essential script tags or corrupt the initialization logic.

  • Security Headers/CSP: Overly restrictive Content Security Policies may block the execution of the B2B core.

  • Optimization Plugins: Tools that defer or "lazy load" all JavaScript might prevent B2bPlatform from being available when the UI needs it.

Webpack Permission Denied

sh: 1: webpack: Permission denied

This usually occurs due to restricted file permissions in the node_modules directory or an interrupted npm install process.

Reset the local Node environment within the plugin:

  1. Navigate to src/Resources/app/b2b_platform inside the b2bsellerscore plugin.

  2. Remove the existing lock file and modules:

  3. Reinstall dependencies:

  4. Return to the Shopware root and attempt the build again.

circle-info

Always ensure that your npm version is up to date and that the user executing the bin/console command has write permissions to the custom/plugins and public/bundles directories.

Last updated

Was this helpful?