Trying to create a plugin according to doc. Using npm init @capacitor/plugin@latest
, following the standard process. Then I get bombarded with errors:
% npm run build
> capacitor-test-plugin@0.0.1 build
> npm run clean && npm run docgen && tsc && rollup -c rollup.config.js
> capacitor-test-plugin@0.0.1 clean
> rimraf ./dist
> capacitor-test-plugin@0.0.1 docgen
> docgen --api TestPlugin --output-readme README.md --output-json dist/docs.json
✔️ DocGen Output: /Users/user/dev/capacitor-test-plugin/dist/docs.json
✔️ DocGen Output: /Users/user/dev/capacitor-test-plugin/README.md
../node_modules/@types/cacheable-request/index.d.ts:26:42 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
26 cb?: (response: ServerResponse | ResponseLike) => void
~~~~~~~~~~~~
../node_modules/@types/cacheable-request/index.d.ts:77:51 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
77 listener: (response: ServerResponse | ResponseLike) => void
~~~~~~~~~~~~
../node_modules/@types/cacheable-request/index.d.ts:81:69 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
81 on(event: 'response', listener: (response: ServerResponse | ResponseLike) => void): this;
~~~~~~~~~~~~
../node_modules/@types/cacheable-request/index.d.ts:84:71 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
84 once(event: 'response', listener: (response: ServerResponse | ResponseLike) => void): this;
~~~~~~~~~~~~
../node_modules/@types/cacheable-request/index.d.ts:89:51 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
89 listener: (response: ServerResponse | ResponseLike) => void
~~~~~~~~~~~~
../node_modules/@types/cacheable-request/index.d.ts:95:51 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
95 listener: (response: ServerResponse | ResponseLike) => void
~~~~~~~~~~~~
../node_modules/@types/cacheable-request/index.d.ts:104:51 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
104 listener: (response: ServerResponse | ResponseLike) => void
~~~~~~~~~~~~
../node_modules/@types/cacheable-request/index.d.ts:108:70 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
108 off(event: 'response', listener: (response: ServerResponse | ResponseLike) => void): this;
~~~~~~~~~~~~
../node_modules/@types/cacheable-request/index.d.ts:112:73 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
112 listeners(event: 'response'): Array<(response: ServerResponse | ResponseLike) => void>;
~~~~~~~~~~~~
../node_modules/@types/cacheable-request/index.d.ts:115:76 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
115 rawListeners(event: 'response'): Array<(response: ServerResponse | ResponseLike) => void>;
~~~~~~~~~~~~
../node_modules/@types/cacheable-request/index.d.ts:118:60 - error TS2709: Cannot use namespace 'ResponseLike' as a type.
118 emit(event: 'response', response: ServerResponse | ResponseLike): boolean;
~~~~~~~~~~~~
Found 11 errors.
Updating everything to latest (ncu -u && npm i
) results in same errors.