Questions
median-js-bridge installation fails
5 months ago by Takato
Hi,
I'm trying to convert my nextjs app to median app.
When I added median-js-bridge to my project, following error occurs.
21:34:24.932 /opt/buildhome/repo/node_modules/median-js-bridge/dist/index.js:1
21:34:24.932 import * as plugins from './plugins';
21:34:24.933 ^^^^^^
21:34:24.937
21:34:24.937 SyntaxError: Cannot use import statement outside a module
21:34:24.937 at internalCompileFunction (node:internal/vm:73:18)
21:34:24.937 at wrapSafe (node:internal/modules/cjs/loader:1176:20)
21:34:24.937 at Module._compile (node:internal/modules/cjs/loader:1218:27)
21:34:24.938 at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
21:34:24.938 at Module.load (node:internal/modules/cjs/loader:1117:32)
21:34:24.938 at Module._load (node:internal/modules/cjs/loader:958:12)
21:34:24.938 at Module.require (node:internal/modules/cjs/loader:1141:19)
21:34:24.939 at require (node:internal/modules/cjs/helpers:110:18)
21:34:24.939 at 500 (/opt/buildhome/repo/.next/server/pages/mypage.js:517:18)
21:34:24.939 at __webpack_require__ (/opt/buildhome/repo/.next/server/webpack-runtime.js:25:42)
21:34:24.941
21:34:24.942 > Build error occurred
21:34:24.942 Error: Failed to collect page data for /mypage
21:34:24.942 at /opt/buildhome/repo/node_modules/next/dist/build/utils.js:1055:15
21:34:24.942 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
21:34:24.942 type: 'Error'
21:34:24.943 }
21:34:25.041 Failed: Error while executing user command. Exited with error code: 1
21:34:25.077 Failed: build command exited with code: 1
21:34:26.172 Failed: error occurred while running build command
Any clue on this?