discovery icon indicating copy to clipboard operation
discovery copied to clipboard

All packages should be a module

Open artalar opened this issue 1 year ago • 1 comments

Hi! Currently the main package is a module package, and the json-ext package is not a module and it leads to an error in some package managers.

ERROR in ../../../node_modules/@discoveryjs/discovery/src/core/encodings/json.js 1:0-67
Module not found: Error: Can't resolve '@discoveryjs/json-ext/src/parse-chunked' in '/home/artalar/code/audienzz/node_modules/@discoveryjs/discovery/src/core/encodings'
Did you mean 'parse-chunked.js'?
BREAKING CHANGE: The request '@discoveryjs/json-ext/src/parse-chunked' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../../../node_modules/@discoveryjs/discovery/src/core/encodings/index.js 1:0-44 1:0-44
 @ ../../../node_modules/@discoveryjs/discovery/src/core/utils/load-data.js 4:0-58 125:8-31 126:8-29
 @ ../../../node_modules/@discoveryjs/discovery/src/extensions/embed-client.js 2:0-82 201:41-59 210:62-78
 @ ../../../node_modules/@discoveryjs/discovery/src/lib.js 8:0-49 13:0-26:2
......

artalar avatar Jun 14 '24 08:06 artalar

The issue is caused by a missed extension for an import path. Regression was added in last version, so you should try previous version for now. The issue will be fixed with next version this week.

lahmatiy avatar Jun 17 '24 10:06 lahmatiy

The issue should be resolved now. Please, try with new version v1.0.0-beta.84

lahmatiy avatar Sep 05 '24 14:09 lahmatiy