Stand-alone Studio codemirror module not found errors

3 “Module not found” errors appear when you npm run start in the stand-alone studio.

These errors can be simply dismissed-- they don’t stop the studio from running. You can dismiss the errors and the studio will initially run. However, trying to start any new design results in a blank screen. And, in the JavaScript console, I see Unhandled Promise Rejection: Error: Cannot find module './useCodeMirror'

Edit: Added. I was able to work around the problems by rm -rf node_modules/@uiw/react-codemirror then npm install @uiw/react-codemirror@4.23.10 to downgrade to the version before the bug.

The issue appears to be a known bug in uiwjs/react-codemirror:

Module not found: Error: Can't resolve './useCodeMirror' in '.../node_modules/@uiw/react-codemirror/esm'
Did you mean 'useCodeMirror.js'?
BREAKING CHANGE: The request './useCodeMirror' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

--------------------------

Module not found: Error: Can't resolve './getDefaultExtensions' in '.../node_modules/@uiw/react-codemirror/esm'
Did you mean 'getDefaultExtensions.js'?
BREAKING CHANGE: The request './getDefaultExtensions' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

--------------------------

Module not found: Error: Can't resolve './utils' in '.../node_modules/@uiw/react-codemirror/esm'
Did you mean 'utils.js'?
BREAKING CHANGE: The request './utils' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
1 Like