tldr; When we attempt to run the tests for prosemirror-model, we're seeing 75 failures.
We ran into the following while troubleshooting an issue we're running into with our app and thought it might be of interest (our original issue is also the same RangeError, but we should ignore that here).
Environment(s)
Node
Tested while running the following Node versions (switching via nvm):
Apple MacBook Pro (16-inch 2021 - Apple M1 Pro)
macOs Monterey 12.6.1 (21G217)
(and another Mac for which I don't have the exact specs)
Reproduction steps
git clone https://github.com/ProseMirror/prosemirror-model.git
cd prosemirror-model
# git checkout 1.18.2
npm install
npm run prepare
npm test
This results in 75 tests with failures similar to RangeError: Can not convert <"hello"> to a Fragment (looks like multiple versions of prosemirror-model were loaded).
Example test error output
1) DOMParser
parse
can represent simple node:
RangeError: Can not convert <"hello"> to a Fragment (looks like multiple versions of prosemirror-model were loaded)
at Function.from (file:///some-path/prosemirror-model/node_modules/prosemirror-model/dist/index.js:359:15)
at NodeType.create (file:///some-path/prosemirror-model/node_modules/prosemirror-model/dist/index.js:2145:66)
at NodeContext.finish (file:///some-path/prosemirror-model/dist/index.js:2691:38)
at ParseContext.closeExtra (file:///some-path/prosemirror-model/dist/index.js:2995:62)
at ParseContext.finish (file:///some-path/prosemirror-model/dist/index.js:3001:14)
at DOMParser.parse (file:///some-path/prosemirror-model/dist/index.js:2519:24)
at Context.<anonymous> (file:///some-path/prosemirror-model/test/test-dom.js:23:50)
Workarounds
Not really a workaround, but noticed that removing the following lines from prosemirror-model's package.json allows the tests to succeed:
First of all, thanks for all the great work.
Summary
tldr; When we attempt to run the tests for prosemirror-model, we're seeing 75 failures.
We ran into the following while troubleshooting an issue we're running into with our app and thought it might be of interest (our original issue is also the same
RangeError
, but we should ignore that here).Environment(s)
Node
Tested while running the following Node versions (switching via nvm):
Typescript
"typescript": "4.6.2"
todevDependencies
to lock it to the exact version specified in https://github.com/marijnh/buildtool/blob/main/package.jsonMachine
Apple MacBook Pro (16-inch 2021 - Apple M1 Pro) macOs Monterey 12.6.1 (21G217) (and another Mac for which I don't have the exact specs)
Reproduction steps
This results in 75 tests with failures similar to
RangeError: Can not convert <"hello"> to a Fragment (looks like multiple versions of prosemirror-model were loaded)
.Example test error output
Workarounds
Not really a workaround, but noticed that removing the following lines from prosemirror-model's
package.json
allows the tests to succeed:Additional details
Output of
npm ls -a
: