Package path ./debug is not exported from package
nolde opened this issue · comments
Ricardo Nolde commented
When trying to import the debug module, I get the following error (removed <path>
for clarity):
Module not found: Error: Package path ./debug is not exported from package <path>\node_modules\robot3 (see exports field in <path>\node_modules\robot3\package.json)
Looking at the package.json
bundled into the package, it indeed does not have a mapping for it in exports
:
"main": "dist/machine.js",
"exports": {
".": {
"require": "./dist/machine.js",
"import": "./machine.js",
"default": "./machine.js"
}
},
A new clause for debug is needed:
"main": "dist/machine.js",
"exports": {
".": {
"require": "./dist/machine.js",
"import": "./machine.js",
"default": "./machine.js"
}
"./debug": {
"require": "./dist/debug.js",
"import": "./debug.js",
"default": "./debug.js"
}
},