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

Error: Cannot find symbol for node: push #118

Closed
wolfram77 opened this issue May 19, 2020 · 4 comments
Closed

Error: Cannot find symbol for node: push #118

wolfram77 opened this issue May 19, 2020 · 4 comments

Comments

@wolfram77
Copy link

@timocov , i am using dts-bundle-generator with source file index.ts. This file imports from a number of files with which contain similarly named types, functions. But these are not exported. I am able to compile it with tsc and the generate both the mjs and cjs file. And then in try to run dts-bundle-generator. I get a few warnings, probably the similar names, but it also crashes with following error:

Error: Cannot find symbol for node: push

Here is the full message. I hope you can tell what is causing it? Is there any trick i can use to avoid this?

cpExec: .dts-bundle-generator --out-file "index.d.ts" --no-banner "src/index.ts" { stdio: [ 0, 1, 2 ] }
Compiling input files...
WARNING: It seems that some files in the compilation still are not declaration files.
For more information see https://github.com/timocov/dts-bundle-generator/issues/53.
If you think this is a mistake, feel free to open new issue or just ignore this warning.
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/count/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/count/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/count-as/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/count-as/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/count-as/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/entries/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/every/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/every/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/find/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/find/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/find-index/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/find-index/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/for-each/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/for-each/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-disjoint/is.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-disjoint/isOnce.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-disjoint/many.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-disjoint/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-disjoint/_cmp.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-disjoint/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-disjoint/_uniques.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-disjoint/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-infix/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-infix/_cmp.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-infix/_array.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-infix/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-infix/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-unique/is.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-unique/isOnce.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-unique/many.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-unique/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-unique/_cmp.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-unique/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/is-unique/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/keys/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/max/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/max/_cmp.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/max/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/max/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/max-index/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/max-index/_cmp.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/max-index/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/max-index/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/min/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/min/_cmp.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/min/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/min/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/min-index/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/min-index/_cmp.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/min-index/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/min-index/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/partition/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/partition/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/partition-as/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/partition-as/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/partition-as/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/range/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/range/_cmp.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/range/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/range/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/search/_id.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/search/_cmp.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/search/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/search/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/some/_types.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/some/index.ts
  /home/wolfram/Documents/extra-array/node_modules/@extra-iterable/values/index.ts


Error: Cannot find symbol for node: push
(node:26707) UnhandledPromiseRejectionWarning: Error: Command failed: /home/wolfram/.npm/bin/dts-bundle-generator --out-file "index.d.ts" --no-banner "src/index.ts"
    at checkExecSyncError (child_process.js:611:11)
    at Object.execSync (child_process.js:647:15)
    at cpExec (/home/wolfram/Documents/extra-array/node_modules/extra-build/src/cpExec.js:10:13)
    at execDts (/home/wolfram/Documents/extra-array/node_modules/extra-build/src/execDts.js:27:3)
    at updateMain (/home/wolfram/Documents/extra-array/node_modules/extra-build/src/updateMain.js:26:3)
    at Object.update (/home/wolfram/Documents/extra-array/node_modules/extra-build/src/update.js:32:24)
    at main (/home/wolfram/Documents/extra-array/node_modules/extra-build/bin.js:19:41)
    at Object.<anonymous> (/home/wolfram/Documents/extra-array/node_modules/extra-build/bin.js:34:27)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26707) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:26707) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Thanks.

@wolfram77
Copy link
Author

This error is coming up when i re-export a method from extra-iterable. I tried wrapping those functions in a local function and it works. In both cases tsc and rollup work fine though.

@wolfram77
Copy link
Author

I tried it again, but this time only for 2-3 functions. It gave no error, but its declaration was not there in index.d.ts. Probably thats what the warning is telling. Maybe the error was related to something else.

@timocov
Copy link
Owner

timocov commented Jul 1, 2020

This error is coming up when i re-export a method from extra-iterable

WARNING: It seems that some files in the compilation still are not declaration files.

/home/wolfram/Documents/extra-array/node_modules/@extra-iterable/count/_types.ts

@wolfram77 It seems that package @extra-iterable provides ts files rather than d.ts ones in the package?

@wolfram77
Copy link
Author

@timocov I read #53 and understood that .ts files should not be present, it should the declarations + js file. I am still using the same method as before, not re-exporting a function. This tool is part of my essential code toolkit, thanks. I am started with these "helper" functions thinking they would be "easy", but it did took a really long time.

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

2 participants