Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple typescript erros when running npm run build #1

Open
monyarm opened this issue May 5, 2022 · 0 comments
Open

multiple typescript erros when running npm run build #1

monyarm opened this issue May 5, 2022 · 0 comments

Comments

@monyarm
Copy link

monyarm commented May 5, 2022


> obsidian-export@0.12.0 build /home/monyarm/Documents/Obsidian Notes/obsidian-export
> tsc -noEmit -skipLibCheck && node esbuild.config.mjs production

main.ts:251:43 - error TS2663: Cannot find name 'app'. Did you mean the instance member 'this.app'?

251   const customJS = loadCustomJS(basePath, app)
                                              ~~~

main.ts:252:10 - error TS2339: Property 'customJS' does not exist on type 'Window & typeof globalThis'.

252   window.customJS = customJS
             ~~~~~~~~

src/plugins/customJS/customJS.ts:7:30 - error TS2339: Property 'plugins' does not exist on type 'App'.

7  const customJSPlugin = app?.plugins?.plugins?.customjs;
                               ~~~~~~~

src/plugins/customJS/customJS.ts:10:79 - error TS2339: Property 'plugins' does not exist on type 'App'.

10   console.log(`[Obsidian export]: CustomJS not found among`, Object.keys(app?.plugins?.plugins))
                                                                                 ~~~~~~~

src/plugins/customJS/customJS.ts:34:4 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.

34    customJS[className] = window.eval(file)
      ~~~~~~~~~~~~~~~~~~~

src/plugins/obsidian-dataview/remarkDataview.ts:12:11 - error TS2430: Interface 'DataviewAPIExtended' incorrectly extends interface 'DvAPIInterface'.
  The types returned by 'list(...)' are incompatible between these types.
    Type 'Node' is missing the following properties from type 'Promise<void>': then, catch, finally, [Symbol.toStringTag]

12 interface DataviewAPIExtended extends DataviewAPI {
             ~~~~~~~~~~~~~~~~~~~

src/plugins/obsidian-dataview/remarkDataview.ts:25:10 - error TS7051: Parameter has a name but no type. Did you mean 'arg0: any'?

25  clean: (any) => Node;
            ~~~

src/plugins/obsidian-dataview/remarkDataview.ts:58:5 - error TS2339: Property 'clean' does not exist on type 'Partial<DataviewAPIExtended>'.

58  dv.clean = clean
       ~~~~~


Found 8 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! obsidian-export@0.12.0 build: `tsc -noEmit -skipLibCheck && node esbuild.config.mjs production`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the obsidian-export@0.12.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/monyarm/.npm/_logs/2022-05-05T18_30_48_325Z-debug.log

I'm running Gentoo Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant