You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR in ./node_modules/midiconvert/src/Midi.js
Module not found: Error: Can't resolve 'jsmidgen' in '/Users/josephweidinger/git/personal/MidiConvertWrapperAdvanced/node_modules/midiconvert/src'
@ ./node_modules/midiconvert/src/Midi.js 2:0-35
@ ./node_modules/midiconvert/src/MidiConvert.js
@ ./src/main.ts
ERROR in ./node_modules/midiconvert/src/Midi.js
Module not found: Error: Can't resolve 'midi-file-parser' in '/Users/josephweidinger/git/personal/MidiConvertWrapperAdvanced/node_modules/midiconvert/src'
@ ./node_modules/midiconvert/src/Midi.js 1:0-43
@ ./node_modules/midiconvert/src/MidiConvert.js
@ ./src/main.ts
Here are 4 methods to make it work... but they all feel wrong...
If I run the commands:
npm install jsmidgen
npm install midi-file-parser
The errors go away.
Looking at the package.json, I notice that these seemingly important dependencies are only devDependencies. If I fork the project and make them dependencies, it installs both of these automatically and everything is good.
Deleting node_modules/midiconvert/src (forces it to use /build)
Deleting in package.json "module": "src/MidiConvert.js",
So it appears the issue is it is using the src dir and not the bundle when you import. It then fails when it tries to compile Midi.js because of the lines:
import * as Decoder from 'midi-file-parser'
import * as Encoder from 'jsmidgen'
In my opinion, it makes sense to list these things as dependencies and not devDependencies. So I'm going to make a PR and you all can decide.
Great library!
The text was updated successfully, but these errors were encountered:
jsphweid
changed the title
jsmidgen and midi-file-parser
can't resolve jsmidgen and midi-file-parser
Dec 8, 2017
I get this error when I try to use this library.
Here are 4 methods to make it work... but they all feel wrong...
The errors go away.
Looking at the package.json, I notice that these seemingly important dependencies are only devDependencies. If I fork the project and make them dependencies, it installs both of these automatically and everything is good.
Deleting node_modules/midiconvert/src (forces it to use /build)
Deleting in package.json
"module": "src/MidiConvert.js",
So it appears the issue is it is using the src dir and not the bundle when you import. It then fails when it tries to compile Midi.js because of the lines:
In my opinion, it makes sense to list these things as dependencies and not devDependencies. So I'm going to make a PR and you all can decide.
Great library!
The text was updated successfully, but these errors were encountered: