Peer dependency issue for elm 0.19.1-1
berry opened this issue · 8 comments
Elm 0.19.1 is out. Installing elm@latest (=elm 0.19.1-1) causes elm-webpack-loader to report:
npm WARN elm-webpack-loader@6.0.0 requires a peer of elm@0.19.0-no-deps || ^0.19.1 but none is installed. You must install peer dependencies yourself.
Alternative: run npm upgrade
. But, that tries to install elm@0.19.1 (without the -1). This throws an error in the install script:
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'path', 'string');
^
I'm stuck. Seems to me elm-webpack-loader (still?) has a dependency issue?
@Skinney Any idea why ^0.19.1-0 || 0.19.0-no-deps
doesn't seem to match 0.19.1
according to https://semver.npmjs.com/ (while ^0.19.0-0 || 0.19.0-no-deps
does seem to match 0.19.0
)?
I don't. Tried out a couple of things but didn't have much luck :/
Guess we'll have to look upstream 😞
I ended up ditching webpack for a custom Elm buildpack (we're on Heroku) and Parcel. Was a rough few days not being able to deploy.
@heyakyra I think it makes sense to ^0.19.1-0 || 0.19.0-no-deps
. At least then we get the latest 0.19.1 release.
This issue gave me a reason give Parcel a try. Turned out the switch was quite easy. I find Parcel much easier to use than Webpack. I am not going back to Webpack :-)
This seems to work for me when I DONT have elm as a peer dependency and instead have it installed on the CLI, does that make any sense?
I get this warning
npm WARN elm-webpack-loader@6.0.0 requires a peer of elm@0.19.0-no-deps || ^0.19.1 but none is installed. You must install peer dependencies yourself.
But it still compiles fine?
Sure. A peer dependency should only give you a warning that you need to install something yourself. We don't actually depend on elm being installed by npm, just that it exists. Us definining it as a peer dependency is just a way of telling our users that it should be of a certain version, but we'll try running it anyways.