Dependency issue in latest version
nvie opened this issue Β· comments
π Bug report
I tried installing the latest version (0.0.5) and hit the following error when building a bundle:
β [ERROR] Could not resolve "@fp-ts/data/List"
node_modules/@fp-ts/schema/_mjs/data/List.mjs:5:19:
5 β import * as L from "@fp-ts/data/List";
β΅ ~~~~~~~~~~~~~~~~~~
The module "./_mjs/List.mjs" was not found on the file system:
node_modules/@fp-ts/schema/node_modules/@fp-ts/data/package.json:31:19:
31 β "default": "./_mjs/*.mjs"
β΅ ~~~~~~~~~~~~~~
This error seems correct, as the List
module no longer seems to exist in the latest version of @fp-ts/data
(0.0.26).
Current Behavior
Bundling @fp-ts/schema
into an app bundle breaks.
Expected behavior
Bundling works :)
Reproducible example
- Install latest version (0.0.5)
- Open a
node
REPL - Type
await import('@fp-ts/schema/Schema')
(this throws, instead of returning the module)
Suggested solution(s)
It looks like this import is no longer valid: https://github.com/fp-ts/schema/blob/main/src/Schema.ts#L28 Could this line be removed?
Additional context
n/a
Your environment
Which versions of @fp-ts/schema
are affected by this issue? Did this work in previous versions of @fp-ts/schema
?
Software | Version(s) |
---|---|
@fp-ts/schema | 0.0.5 |
TypeScript | 4.7.4 |
I'll release a new version soon, in the meanwhile you can install older versions of /core and /data
AFAIk The following versions should work well together
"dependencies": {
"@fp-ts/core": "0.0.9",
"@fp-ts/data": "0.0.22",
"@fp-ts/schema": "0.0.5"
}
@nvie 0.0.6
released