Skip to content

[bug] fix CI error #20

@hsluoyz

Description

@hsluoyz

see: https://github.com/casbin/casbin-core/actions/runs/21599114274/job/62239844909

Run yarn install && yarn build && yarn link
  yarn install && yarn build && yarn link
  shell: /usr/bin/bash -e {0}
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "cz-conventional-changelog > @commitlint/load > cosmiconfig-typescript-loader@6.2.0" has incorrect peer dependency "typescript@>=5".
[4/4] Building fresh packages...
$ husky install
husky - Git hooks installed
Done in 16.28s.
yarn run v1.22.22
$ run-s clean && run-p build:**
$ rimraf lib es dist
$ tsc -p tsconfig.cjs.json
$ rollup -c
$ tsc -p tsconfig.esm.json

src/index.ts → dist/casbin-core.js, dist/casbin-core.mjs, dist/casbin-core.esm.js...
(!) Plugin typescript: @rollup/plugin-typescript TS18046: 'e' is of type 'unknown'.
src/internalEnforcer.ts: (36:13)

36         if (e.message !== 'not implemented') {
               ~

src/internalEnforcer.ts: (73:15)

73           if (e.message !== 'not implemented') {
                 ~

src/internalEnforcer.ts: (111:15)

111           if (e.message !== 'not implemented') {
                  ~

src/internalEnforcer.ts: (147:13)

147         if (e.message !== 'not implemented') {
                ~

src/internalEnforcer.ts: (182:15)

182           if (e.message !== 'not implemented') {
                  ~

src/internalEnforcer.ts: (215:13)

215         if (e.message !== 'not implemented') {
                ~

(!) Circular dependency
src/model/assertion.ts -> src/model/model.ts -> src/model/assertion.ts
created dist/casbin-core.js, dist/casbin-core.mjs, dist/casbin-core.esm.js in 9.5s
Error: src/internalEnforcer.ts(36,13): error TS18046: 'e' is of type 'unknown'.
Error: src/internalEnforcer.ts(73,15): error TS18046: 'e' is of type 'unknown'.
Error: src/internalEnforcer.ts(111,15): error TS18046: 'e' is of type 'unknown'.
Error: src/internalEnforcer.ts(147,13): error TS18046: 'e' is of type 'unknown'.
Error: src/internalEnforcer.ts(182,15): error TS18046: 'e' is of type 'unknown'.
Error: src/internalEnforcer.ts(215,13): error TS18046: 'e' is of type 'unknown'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build:lib:esm" exited with 2.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions