You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?:
I came across a bug. What is the current behavior?:
I copied the example code and found that Icannot initialize the PixivApp instance. However, when I switched my current ES6 import method (import PixivAppApi from 'pixiv-app-api' ) to CommonJS module(const PixivAppApi =require('pixiv-app-api' )), it works.
The console log is:
this.pixiv = new PixivAppApi(this.config.username as string, this.config.password as string, {
^
TypeError: pixiv_app_api_1.default is not a constructor
at new Pixiv (D:\work\michanDaily\src\services\puller\Pixiv\main.ts:30:22)
at Object.<anonymous> (D:\work\michanDaily\src\app.ts:14:9)
at Module._compile (node:internal/modules/cjs/loader:1267:14)
at Module.m._compile (D:\work\michanDaily\node_modules\.pnpm\[email protected]_pilkwpwcmsgv4hfi6z42mdzm2m\node_modules\ts-node\src\index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1321:10)
at Object.require.extensions.<computed> [as .ts] (D:\work\michanDaily\node_modules\.pnpm\[email protected]_pilkwpwcmsgv4hfi6z42mdzm2m\node_modules\ts-node\src\index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1125:32)
at Function.Module._load (node:internal/modules/cjs/loader:965:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at phase4 (D:\work\michanDaily\node_modules\.pnpm\[email protected]_pilkwpwcmsgv4hfi6z42mdzm2m\node_modules\ts-node\src\bin.ts:649:14)
What is the expected behavior?:
Using ES6 import works. Suggested solution:
I've checked the source code and found no obvious error.
The text was updated successfully, but these errors were encountered:
node
version:20.1.0npm
(oryarn
) version:pnpm 7.28Do you want to request a feature or report a bug?:
I came across a bug.
What is the current behavior?:
I copied the example code and found that Icannot initialize the PixivApp instance. However, when I switched my current ES6 import method (import PixivAppApi from 'pixiv-app-api' ) to CommonJS module(const PixivAppApi =require('pixiv-app-api' )), it works.
The console log is:
What is the expected behavior?:
Using ES6 import works.
Suggested solution:
I've checked the source code and found no obvious error.
The text was updated successfully, but these errors were encountered: