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
11:04:57 AM [@medusajs/admin] An error occured while trying to load your custom Webpack config. See the error below for details:
import { withCustomWebpackConfig } from "@medusajs/admin";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1274:20)
at Module._compile (node:internal/modules/cjs/loader:1320:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
at Module.load (node:internal/modules/cjs/loader:1197:32)
at Module._load (node:internal/modules/cjs/loader:1013:12)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at getCustomWebpackConfig (/Users/nio/official/medusa/medusa-brands/node_modules/@medusajs/admin/node_modules/@medusajs/admin-ui/dist/index.js:45:5741)
at async develop (/Users/nio/lifease/trash/eivape/official/medusa/medusa-eivape-brands/node_modules/@medusajs/admin/node_modules/@medusajs/admin-ui/dist/index.js:45:7376)
11:04:57 AM [@medusajs/admin] Exiting process
How can this issue be resolved?
No response
Are you interested in working on this issue?
I would like to fix this issue
The text was updated successfully, but these errors were encountered:
Thank you for submitting this issue! The example in the documentation should use CommonJS rather than ESM (so require instead of import.) So something like this:
* docs: fix code snippet for webpack custom configurations
Fix the code snippet in the admin's webpack custom configurations to use CJS rather than ESM
Closes#7187
* fix lint error
Preliminary Checks
Issue Summary
11:04:57 AM [@medusajs/admin] An error occured while trying to load your custom Webpack config. See the error below for details:
import { withCustomWebpackConfig } from "@medusajs/admin";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1274:20)
at Module._compile (node:internal/modules/cjs/loader:1320:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
at Module.load (node:internal/modules/cjs/loader:1197:32)
at Module._load (node:internal/modules/cjs/loader:1013:12)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at getCustomWebpackConfig (/Users/nio/official/medusa/medusa-brands/node_modules/@medusajs/admin/node_modules/@medusajs/admin-ui/dist/index.js:45:5741)
at async develop (/Users/nio/lifease/trash/eivape/official/medusa/medusa-eivape-brands/node_modules/@medusajs/admin/node_modules/@medusajs/admin-ui/dist/index.js:45:7376)
11:04:57 AM [@medusajs/admin] Exiting process
How can this issue be resolved?
No response
Are you interested in working on this issue?
The text was updated successfully, but these errors were encountered: