Giter Club home page Giter Club logo

Comments (2)

biggeye avatar biggeye commented on July 28, 2024 1

The 'fs' module error is because the 'natural' library is designed for server-side usage. The 'fs' module is a core Node.js module for filesystem access, which is not available in the browser.

possible solution:
create an api route for Natural and then fetch to it. i'm in the middle of implementing this myself otherwise i'd share more detail

from natural.

Hugo-ter-Doest avatar Hugo-ter-Doest commented on July 28, 2024

There is a webpack.config.js in natural with the sole purpose of running the Jasmine tests in the browser: https://github.com/NaturalNode/natural/blob/master/webpack.config.js
It solves among other things the issue with fs.

@biggeye is right, natural is meant to be run server side.

Besides that, in most of the modules that require fs, the files that were read are replaced by JSON files that can be required. So, the number of files that need fs is minimal. I think only some tests remain.

from natural.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.