# How to contribute to the development of Code Mirror 6 ?

**URL:** https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540
**Category:** Uncategorized
**Created:** [September 18, 2021, 1:13pm UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540 "2021-09-18T13:13:11Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![UltraInstinct05](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/u/85e7bf/32.png) [@UltraInstinct05](https://discuss.codemirror.net/u/UltraInstinct05)
#### Post date: [September 18, 2021, 1:13pm UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540/1 "2021-09-18T13:13:11Z")

</div>

Is there any particular guide on how to contribute to the development of CodeMirror 6 ? I can see the CodeMirror 5 repo has it’s own issues list and 6 has it’s own issues list, so that is a bit confusing.

Thank you ! 🙂

---

<div class="post-metadata">

### Author: ![marijn](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/marijn/32/136_2.png) [@marijn](https://discuss.codemirror.net/u/marijn)
#### Post date: [September 18, 2021, 9:53pm UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540/2 "2021-09-18T21:53:55Z")

</div>

It’s a different code base, so it makes sense that they have different issue trackers.

The general approach would be to clone the repository for the package you’re interested in, `npm install` it, make your changes, and submit a pull request against the repository.

---

<div class="post-metadata">

### Author: ![UltraInstinct05](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/u/85e7bf/32.png) [@UltraInstinct05](https://discuss.codemirror.net/u/UltraInstinct05)
#### Post date: [September 19, 2021, 7:13am UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540/3 "2021-09-19T07:13:57Z")

</div>

If I clone down, say `@codemirror/panel`, after making said changes, how do I test the changes in a browser (to see the changes) ? That part is somewhat confusing (Maybe it’s documented somewhere and I have overlooked it ?).

---

<div class="post-metadata">

### Author: ![marijn](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/marijn/32/136_2.png) [@marijn](https://discuss.codemirror.net/u/marijn)
#### Post date: [September 19, 2021, 10:43am UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540/4 "2021-09-19T10:43:37Z")

</div>

Set up a test page and bundle the libraries you need for it into a script. Or, if you want to set up a dev environment with all the CM6-related packages, clone [https://github.com/codemirror/codemirror.next/](https://github.com/codemirror/codemirror.next/) and follow the instructions in the readme.

---

<div class="post-metadata">

### Author: ![UltraInstinct05](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/u/85e7bf/32.png) [@UltraInstinct05](https://discuss.codemirror.net/u/UltraInstinct05)
#### Post date: [September 19, 2021, 11:45am UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540/5 "2021-09-19T11:45:09Z")

</div>

After going through the `bin/cm.js` script roughly, it looks like it provides helpers command line options for stuff & I can use the `demo` for testing. And there is also `node bin/cm.js push` which will look into any sub package for changes and push those into the respective repository (I believe).

Thanks for the help !

---

<div class="post-metadata">

### Author: ![UltraInstinct05](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/u/85e7bf/32.png) [@UltraInstinct05](https://discuss.codemirror.net/u/UltraInstinct05)
#### Post date: [September 19, 2021, 11:52am UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540/6 "2021-09-19T11:52:50Z")

</div>

Running `npm run dev` in `codemirror.next` gives a lot of

`'@codemirror/state' is imported by collab\src\collab.d.ts, but could not be resolved – treating it as an external dependency`

and looking into the console (port 8090) I see `Uncaught TypeError: Failed to resolve module specifier "@codemirror/basic-setup". Relative references must start with either "/", "./", or "../".`.

Any idea (This is on Windows 10) ?

---

<div class="post-metadata">

### Author: ![marijn](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/marijn/32/136_2.png) [@marijn](https://discuss.codemirror.net/u/marijn)
#### Post date: [September 19, 2021, 3:12pm UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540/7 "2021-09-19T15:12:23Z")

</div>

Did you run `bin/cm.js install`?

---

<div class="post-metadata">

### Author: ![UltraInstinct05](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/u/85e7bf/32.png) [@UltraInstinct05](https://discuss.codemirror.net/u/UltraInstinct05)
#### Post date: [September 20, 2021, 4:22am UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540/8 "2021-09-20T04:22:02Z")

</div>

Yes, and that’s when I get all of those (this is just one statement, but it looks like every CodeMirror “subrepo” in `codemirror.next` is throwing atleast 2 or 3 of these)

`'@codemirror/state' is imported by collab\src\collab.d.ts, but could not be resolved – treating it as an external dependency`

Here’s the full output of `node bin/cm.js install` [node bin/cm.js install output - Pastery](https://www.pastery.net/qpryru/) (In case it helps)

Thank you for your time !

---

<div class="post-metadata">

### Author: ![marijn](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/marijn/32/136_2.png) [@marijn](https://discuss.codemirror.net/u/marijn)
#### Post date: [September 20, 2021, 5:52am UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540/9 "2021-09-20T05:52:58Z")

</div>

What does `npm --version` give you? You need at least npm 16.

---

<div class="post-metadata">

### Author: ![UltraInstinct05](https://discuss.codemirror.net/letter_avatar_proxy/v4/letter/u/85e7bf/32.png) [@UltraInstinct05](https://discuss.codemirror.net/u/UltraInstinct05)
#### Post date: [September 20, 2021, 8:07am UTC](https://discuss.codemirror.net/t/how-to-contribute-to-the-development-of-code-mirror-6/3540/10 "2021-09-20T08:07:40Z")

</div>

Thanks. That was it. I had node v14. I installed v16+ and it now works fine. I see that the README also mentioned having node v16+.

Thanks for everything !
