-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Unrecognized extension value in extension set ([object Object]) when adding basicSetup #139
Comments
OK, after checking the dependencies on your example projects, I found that I needed to update all my {
"name": "cognito-editor",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register 'src/**/*.test.ts'",
"test:watch": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -w -r ts-node/register 'src/**/*.test.ts'",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"dependencies": {
"@chakra-ui/icons": "^2.0.1",
"@chakra-ui/react": "^2.1.2",
"@codemirror/basic-setup": "^0.19.0",
"@codemirror/commands": "^0.19",
"@codemirror/lang-javascript": "^0.19",
"@codemirror/state": "^0.19",
"@codemirror/view": "^0.19",
"@crinkles/digl": "^0.4.0",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@types/lodash": "^4.14.182",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-mocha": "^10.0.5",
"framer-motion": "^6",
"lodash": "^4.17.21",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-flow-renderer": "^10.3.5",
"react-icons": "^4.4.0",
"rodemirror": "^1.6.7",
"zustand": "^4.0.0-rc.1"
},
"devDependencies": {
"@babel/core": "^7.18.2",
"@storybook/addon-actions": "^6.5.8",
"@storybook/addon-essentials": "^6.5.8",
"@storybook/addon-interactions": "^6.5.8",
"@storybook/addon-links": "^6.5.8",
"@storybook/builder-vite": "^0.1.36",
"@storybook/react": "^6.5.8",
"@storybook/testing-library": "^0.0.11",
"@types/chai": "^4.3.1",
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.38",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@vitejs/plugin-react": "^1.3.0",
"babel-loader": "^8.2.5",
"chai": "^4.3.6",
"mocha": "^10.0.0",
"simple-zustand-devtools": "^1.0.1",
"ts-node": "^10.8.0",
"typescript": "^4.6.3",
"vite": "^2.9.9"
}
} It might be a good idea to add this info to instructions, and feel free to close this issue. Thanks! |
Yeah CodeMirror has interesting install behavior, worsened by the fact that it (was) not following semver yet. Looks like someone opened an issue at codemirror/dev#858. I'm ok with clarifying in the docs that this is only a small wrapper and any errors are likely due to CodeMirror and not this package. |
I ran into the same problem and spent quite a lot of time until seeing @fcoury 's solution. Thank you for saving my day! Codemirror folks please make the default installation work. |
i think the issue is that |
This looks correct. import { basicSetup } from 'codemirror'; Works for me |
Here's the full code of the component in question:
And here's the stack trace:
EDIT: In case it's relevant, here's also
package.json
:If I remove
basicSetup
from the list of extensions, it works. Any hints?The text was updated successfully, but these errors were encountered: