node-csvtojson icon indicating copy to clipboard operation
node-csvtojson copied to clipboard

Node's types should not be imported for module to be used in browser

Open jer-sen opened this issue 2 years ago • 2 comments

/// <reference types="node" /> should be removed from d.ts, removing @types/node dependency should solve the issue.

jer-sen avatar May 25 '23 22:05 jer-sen

Are you using Next? If you don't explictly use any of the file function stuff, then check out using this as your next.config.js:

/** @type {import('next').NextConfig} */
const nextConfig = {
  ...
  webpack(config) {
    config.resolve.fallback = {
      ...config.resolve.fallback, // if you miss it, all the other options in fallback, specified
        // by next.js will be dropped. Doesn't make much sense, but how it is
      fs: false, // the solution
    }

    return config
  }
}

module.exports = nextConfig

SpBills avatar Jun 30 '23 20:06 SpBills

No, I'm not using Next.

jer-sen avatar Jul 02 '23 12:07 jer-sen