fratzinger / feathers-casl

feathers.js + casl: hooks & channels
https://feathers-casl.netlify.app/
MIT License
40 stars 18 forks source link

feathers-casl@1.0.0.-0 - error with 'feathers-utils' is a CommonJS module #80

Closed martinfruehmorgen closed 1 year ago

martinfruehmorgen commented 1 year ago

Hello,

trying to use the feathers-casl@1.0.0.-0 together with the pre34 of feathers I get the following error message:

import { getItemsIsArray, mergeArrays, mergeQuery, isMulti, markHookForSkip, shouldSkip } from 'feathers-utils'; ^^^^^^^^^^^^^^^ SyntaxError: Named export 'getItemsIsArray' not found. The requested module 'feathers-utils' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using:

import pkg from 'feathers-utils'; const { getItemsIsArray, mergeArrays, mergeQuery, isMulti, markHookForSkip, shouldSkip } = pkg;

at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:526:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12)

[nodemon] app crashed - waiting for file changes before starting...

It is a fresh install, so no other libraries are referencing to feathers-utils.

Any ideas?

Thanks Martin

fratzinger commented 1 year ago

Thanks for the report!

I've released feathers-casl@1.0.0-1. Please retry it and please let me know how it went.

fratzinger commented 1 year ago

Closing because of inactivity. Please reopen if the issue is not fixed.