question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make more compatible for browser use. Pass TypeScript checks

See original GitHub issue

When compiling code for updated versions of TypeScript, it now checks the require statements and several errors are being thrown:

ERROR in ../node_modules/jsonexport/dist/core/join-rows.js
Module not found: Error: Can't resolve 'os'
ERROR in ../node_modules/jsonexport/dist/parser/csv.js
Module not found: Error: Can't resolve 'os'
ERROR in ../node_modules/jsonexport/dist/core/stream.js
Module not found: Error: Can't resolve 'stream'
ERROR in ../node_modules/jsonexport/dist/parser/csv.js
Module not found: Error: Can't resolve 'stream'

It seems require(‘stream’) and require(‘os’) are not even really needed for the browser. The EOL can just be backslash “\n” in the browser. And stream is not needed if a callback is provided.

I manually edited the node_modules/jsonexport files and all came out well and built to browser. I will need to find the most compatible way to have all files live in harmony and that the dist folder has NO node based requires.

Will have to complete this with-in a weeks time at max. Please be available to publish to npm when I have completed

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kauecommented, Jun 15, 2018

@AckerApple I am honoured to have you helping maintaining this package! Really, thanks Acker!

1reaction
AckerApplecommented, Jun 15, 2018

I’m going to try and publish this code to npm. I feel real confident of it and in need of it for my team.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript: JavaScript With Syntax For Types.
TypeScript is JavaScript with syntax for types. TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at ......
Read more >
TypeScript - Parcel
TypeScript is a typed superset of JavaScript that compiles to JavaScript. Parcel supports TypeScript out of the box without any additional configuration.
Read more >
Introduction to cross-browser testing - Learn web development
Note: Make the web work for everyone discusses the different browsers, their market share, and related cross browser compatibility issues.
Read more >
15 Typescript Mistakes To Avoid - SoftwareMill Tech Blog
Typescript took the Javascript world by storm. If you are a frontend developer working with the browser or a backend dev using Node...
Read more >
Working with JavaScript in Visual Studio Code
Using the TypeScript language service, VS Code can provide smart completions ... you can make IntelliSense even more useful with JSDoc or by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found