TobiasNickel / tXml

:zap:very small and fast xml-parser in pure javascript:zap:
MIT License
212 stars 28 forks source link

index.d.ts errors in console #29

Open arthurlomakin11 opened 2 years ago

arthurlomakin11 commented 2 years ago
node_modules/txml/dist/index.d.ts:2:10 - error TS2552: Cannot find name 'transformSt
ream'. Did you mean 'TransformStream'?

2 export { transformStream, filter, getElementById, getElementsByClassName, parse, s
implify, simplifyLostLess, stringify, toContentString };
           ~~~~~~~~~~~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:13783:13
    13783 declare var TransformStream: {
                      ~~~~~~~~~~~~~~~
    'TransformStream' is declared here.

node_modules/txml/dist/index.d.ts:2:27 - error TS2552: Cannot find name 'filter'. Di
d you mean 'File'?

2 export { transformStream, filter, getElementById, getElementsByClassName, parse, s
implify, simplifyLostLess, stringify, toContentString };
                            ~~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:5014:13
    5014 declare var File: {
                     ~~~~
    'File' is declared here.

node_modules/txml/dist/index.d.ts:2:35 - error TS2304: Cannot find name 'getElementB
yId'.

2 export { transformStream, filter, getElementById, getElementsByClassName, parse, s
implify, simplifyLostLess, stringify, toContentString };
                                    ~~~~~~~~~~~~~~

node_modules/txml/dist/index.d.ts:2:51 - error TS2304: Cannot find name 'getElements
ByClassName'.

2 export { transformStream, filter, getElementById, getElementsByClassName, parse, s
implify, simplifyLostLess, stringify, toContentString };
                                                    ~~~~~~~~~~~~~~~~~~~~~~

node_modules/txml/dist/index.d.ts:2:75 - error TS2304: Cannot find name 'parse'.

2 export { transformStream, filter, getElementById, getElementsByClassName, parse, s
implify, simplifyLostLess, stringify, toContentString };
                                                                            ~~~~~

node_modules/txml/dist/index.d.ts:2:82 - error TS2304: Cannot find name 'simplify'.

2 export { transformStream, filter, getElementById, getElementsByClassName, parse, s
implify, simplifyLostLess, stringify, toContentString };
                                                                                   ~
~~~~~~~

node_modules/txml/dist/index.d.ts:2:92 - error TS2304: Cannot find name 'simplifyLos
tLess'.

2 export { transformStream, filter, getElementById, getElementsByClassName, parse, s
implify, simplifyLostLess, stringify, toContentString };

         ~~~~~~~~~~~~~~~~

node_modules/txml/dist/index.d.ts:2:110 - error TS2304: Cannot find name 'stringify'
.

2 export { transformStream, filter, getElementById, getElementsByClassName, parse, s
implify, simplifyLostLess, stringify, toContentString };

                           ~~~~~~~~~

node_modules/txml/dist/index.d.ts:2:121 - error TS2304: Cannot find name 'toContentS
tring'.

2 export { transformStream, filter, getElementById, getElementsByClassName, parse, s
implify, simplifyLostLess, stringify, toContentString };

Have a lot of errors and it's annoying.

arthurlomakin11 commented 2 years ago

Hey! Why don't you do anything?

TobiasNickel commented 2 years ago

sorry, @arthurlomakin11 for not responding. I am in vacation now, without my notebook.

can i ask you to prepare a PR? can you try to use import txml from 'txml/dist/txml' or import txml from 'txml/txml'? then it should not depend on the File. @manzt do you know a solution?

@arthurlomakin11 how do you build your project? what is node version? typescript version? other build tools? babel?

arthurlomakin11 commented 2 years ago

sorry, @arthurlomakin11 for not responding. I am in vacation now, without my notebook.

can i ask you to prepare a PR? can you try to use import txml from 'txml/dist/txml' or import txml from 'txml/txml'? then it should not depend on the File. @manzt do you know a solution?

@arthurlomakin11 how do you build your project? what is node version? typescript version? other build tools? babel?

Node - 16.5.0 Typescript - 4.5.3 Just using tsc.

arthurlomakin11 commented 2 years ago

@TobiasNickel import txml from 'txml/dist/txml' and import txml from 'txml/txml' don't work. It says there is no txml exported

akyrey commented 2 years ago

@arthurlomakin11 using import * as txml from 'txml/dist/txml'; fixes the console errors

arthurlomakin11 commented 2 years ago

@arthurlomakin11 using import * as txml from 'txml/dist/txml'; fixes the console errors

It just says that there's no txml in txml/dist/txml on runtime.

arthurlomakin11 commented 2 years ago

Any updates?

TobiasNickel commented 2 years ago

I am investigating if I should switch the build process to parcel.js in the hope, that it roduces more reliable a build that works for node, typescript, commonJS, the new es modules and work in browser (without node streams).

jrosseel commented 2 years ago

Having a similar issue

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/txml' is not defined by "exports" in /.../node_modules/txml/package.json

When uploading to GCP

arthurlomakin11 commented 2 years ago

I am investigating if I should switch the build process to parcel.js in the hope, that it roduces more reliable a build that works for node, typescript, commonJS, the new es modules and work in browser (without node streams).

That's definitely good idea!

florianeichin commented 1 year ago

Are there any news?

import * as txml from 'txml/dist/txml'; doesn't fix it on my side, as it's not available at runtime

todd-alexander-cbsi commented 3 months ago

Hey @TobiasNickel - our organization is trying to use this library as well and running into same issues, unfortunately we can't introduce this because the console errors would interrupt our dev environment. Is there any chance you can merge the Pull Request for this fix and put out a new version??