GithubHelp home page GithubHelp logo

Comments (14)

jame-sparker avatar jame-sparker commented on September 28, 2024 5

Just to clarify goldsziggy's answer, you should add
"browser": { "fs": false, "child_process": false },
in package.json under node_modules/neataptic. Not in your package.json file.
Of course, it is best to update this repo directly instead of manually adding it.

from neataptic.

skaraman avatar skaraman commented on September 28, 2024 1

not sure which i was using before, but I got around this by setting my node config with

{
   child_process: 'empty'
}

from neataptic.

skaraman avatar skaraman commented on September 28, 2024 1

You're welcome, keep up the great work here, our future machine overlords demand it

from neataptic.

naoufalzerai avatar naoufalzerai commented on September 28, 2024 1

Just to clarify goldsziggy's answer, you should add
"browser": { "fs": false, "child_process": false },
in package.json under node_modules/neataptic. Not in your package.json file.
Of course, it is best to update this repo directly instead of manually adding it.

Works for me thank you 😄

from neataptic.

wagenaartje avatar wagenaartje commented on September 28, 2024

child_process is an external module, it should be included with Node. How are you running your code?

from neataptic.

skaraman avatar skaraman commented on September 28, 2024

as an npm module, it was working until i upgraded to the latest master branch update
node --version
v8.2.1

from neataptic.

wagenaartje avatar wagenaartje commented on September 28, 2024

Which version were you using before? The latest updates should not have affected multi-threading.

from neataptic.

wagenaartje avatar wagenaartje commented on September 28, 2024

Hmmm. And you were actually using the Node multi-threading option right? Because the only difference between 1.4.0 (when Node multi-threading was added) is 1.4.1 does not affect multi-threading. But i'll look into it.

from neataptic.

skaraman avatar skaraman commented on September 28, 2024

I don't think I have been, I've only recreated the XOR example and have been playing with mutations, training, and evolution options, and sometimes changing which kind of network I'm using. I haven't explicitly called out any multithreading.

from neataptic.

wagenaartje avatar wagenaartje commented on September 28, 2024

Thanks for the info 👍, that might mean you were using an older version (before multithreading was implemented).

from neataptic.

goldsziggy avatar goldsziggy commented on September 28, 2024

So tagging along here as well. I saw this error when bundling neataptic with webpack. I was able to mitigate the issue locally by adding the browser field to the package.json

I added something along these lines and it fixed up the issue

"browser": { "fs": false, "child_process": false },

In short the browser field in the package.json is to help bundlers toggle which modules can be ignored for client-side bundling. Any room for a PR with the above?

from neataptic.

murugaratham avatar murugaratham commented on September 28, 2024

+1 for this, i am unable to build

from neataptic.

prozoroff avatar prozoroff commented on September 28, 2024

You can add the Pre hook into your package.json script section:

"prebuild": "json -I -f node_modules/neataptic/package.json -e 'this.browser={ \"fs\": false, \"child_process\": false }'",

First you need to install the json package if it is not in dependencies:

npm install --save json

from neataptic.

jmullo avatar jmullo commented on September 28, 2024

PR created, would make this work out-of-the-box in Webpack builds.

@wagenaartje

from neataptic.

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.