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
I am having issues included this library in the browser. It appears that this library is using node only APIs (e.x. fs). I am using typescript and webpack.
[0] ERROR in ./node_modules/tXml/tXml.js
Module not found: Error: Can't resolve 'fs' in '.../node_modules/tXml'
I have tried importing a few different ways without any success import { xml as tXml, simplify } from 'tXml'; import * as tXml from 'tXml';
Also, it appears that either the README is out of data or that the typescript definitions generated are incorrect, as the type definition does not match the README examples.
The text was updated successfully, but these errors were encountered:
sorry for the late reply, and thanks for opening this issue, I just published a new version 3.1.3, that is setting the "browser": { "fs": false } in the package.json. So now webpack can build this package with no problem.
Processing streams of course will still only work in node.
second, make sure to import txml lower case. not tXml, or actually, I am not sure why the foldername in your node_modules has the uppercase X. The module name is lower case: https://www.npmjs.com/package/txml
I am having issues included this library in the browser. It appears that this library is using node only APIs (e.x.
fs
). I am using typescript and webpack.I have tried importing a few different ways without any success
import { xml as tXml, simplify } from 'tXml';
import * as tXml from 'tXml';
Also, it appears that either the README is out of data or that the typescript definitions generated are incorrect, as the type definition does not match the README examples.
The text was updated successfully, but these errors were encountered: