-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Suddenly getting this error on compilation. Can't import the named export 'memo' from non EcmaScript module (only default export is available) #477
Comments
@vivekthapliyal4 could you please try the latest version? (v4.5.0) |
@suren-atoyan did that too still getting the same error |
I meet the problem too, lock the version from "^4.4.6" to "4.4.6", install it again, this problem solved. |
@coding-ax dude you saved the day, thx a lot. |
@coding-ax @suren-atoyan still facing the same error |
@vivekthapliyal4 @hemreari @coding-ax could you please tell me more about your setup (CRA, Vite, Snowpack, etc), |
@suren-atoyan fixed now by changing package.json from "^4.4.6" to "4.4.6", do you know what could have caused it because it was working fine before? |
We have a new version ( Having more information about your setup might help. |
node version 16.15.1 |
I have same issue with @monaco-editor/react 4.5.0 node version 16.18.1 |
I saw this issue today too. node v14.21.3 Downgrading to @monaco-editor/react v4.4.6 worked as a workaround but obviously using the newer version would be nice too. |
@CWolfs is it possible to update |
@suren-atoyan upgrading from 4.4.6 to 4.5.0 broke our applications when we re-fetch packages with ^4.4.6 (pulling in 4.5.0).
I have to upgrade some of my packages that are independent of this package to appropriately handle the new changes. {
"resolutions": "@monaco-editor/react": "4.4.6"
} 4.5.0 should have been a major update to 5.0.0 so that it wouldn't be pulled into applications. |
@mnickolay do you use CRA? if so whish version? could you please tell me more about your setup? |
@suren-atoyan Yes, our apps use CRA. For now, our legacy apps (.NET backend, React frontend) are built with CRA 4/Typescript. We have newer apps that are built off of CRA 5/Typescript and have a GraphQL backend. These newer apps do work with CRA (react-scripts) imports webpack as a dependency (which we use)
I've forced the optional chaining error I specified above to go away by resolving acorn to ^8.0.0, but causes issues elsewhere. |
I see, according to all the reports above I reckon |
hello
IN THE BROWSER: WARNING in ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.js 62:39-58 We don't have CRA, we use webpack @monaco-editor/react v4.6.0 |
also tried installing 4.4.6 but it still doesn't work |
fix for cracoyarn add craco-babel-loader --dev
yarn add @babel/plugin-proposal-optional-chaining --dev craco.config.jsconst CracoBabelLoader = require('craco-babel-loader');
module.exports = {
plugins: [
{
plugin: CracoBabelLoader,
options: {
includes: [/node_modules\/monaco-editor/], // add any other paths that need to be included
babelOptions: {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: ['@babel/plugin-proposal-optional-chaining'],
},
},
},
],
}; importimport MonacoEditor from '@monaco-editor/react'; |
thank you, we have abandoned using monaco due to the security issues regarding CSP |
./node_modules/@monaco-editor/react/dist/index.mjs
Can't import the named export 'memo' from non EcmaScript module (only default export is available)
version: 4.4.6
The text was updated successfully, but these errors were encountered: