Giter Club home page Giter Club logo

Comments (8)

dougwilson avatar dougwilson commented on July 4, 2024

The eval function is still a part of Node.js.

from nodejs-depd.

jaruba avatar jaruba commented on July 4, 2024

Then why am I getting this error on app start on 2 different computers, with 2 different Node.js versions?

In the current case I'm using: Node.js v8.11.4 (latest LTS on their site is v8.12.0)

I'm not using Electron, NW.js or anything else, just Node.js

from nodejs-depd.

jaruba avatar jaruba commented on July 4, 2024

Also, I had no problems in the past, this started happening recently.

from nodejs-depd.

dougwilson avatar dougwilson commented on July 4, 2024

I'm not sure. I just tried it out and the function is there still for me:

$ node -e 'console.log(process.version);console.log(typeof eval);console.log(eval("4 + 1"))'
v8.11.4
function
5

and

$ node -e 'console.log(process.version);console.log(typeof eval);console.log(eval("4 + 1"))'
v8.12.0
function
5

Perhaps if you can provide the full steps to reproduce on my end I can help determine why you're having the issue, but without any steps to reproduce, you'll likely need to debug through it or open an issue on the Node.js repo if your binaries are missing a core function.

from nodejs-depd.

dougwilson avatar dougwilson commented on July 4, 2024

One would also think that your report wouldn't be the first and only one (https://github.com/dougwilson/nodejs-depd/issues?utf8=%E2%9C%93&q=is:issue+%22eval+is+not+a+function%22) if eval was really removed from Node.js with this module being in things like express, no? 8.11.4 was released Aug 16, so it seems like someone else would have upgraded to that version of Node.js by now and reported the same issue?

from nodejs-depd.

jaruba avatar jaruba commented on July 4, 2024

This is indeed very strange, your terminal command works for me too:

$ node -e 'console.log(process.version);console.log(typeof eval);console.log(eval("4 + 1"))'
v8.11.4
function
5

But I can't imagine how that error could mean anything else, or be caused by anything else.

I'll try to make a simplistic test case to see if it's reproducible on a small scale, otherwise it may be that my app is somehow breaking it, although i can't currently comprehend how it could break eval like this.

from nodejs-depd.

jaruba avatar jaruba commented on July 4, 2024

holy mother of god, i debugged it and found the issue, thanks for taking the time to put me straight

for your enjoyment, i was using a deobfuscation script found online, which after reading it thoroughly, it does, and I quote:

eval = window.eval = write = document.write = writeln = document.writeln = createPopup = window.createPopup = createElement = document.createElement = appendChild = beautify

jesus christ..

it's annoying that it proved itself to be the best deobfuscation script out there

from nodejs-depd.

dougwilson avatar dougwilson commented on July 4, 2024

What the what? That is pretty mind blowing. I'm glad you found the issue. I would have been happy to re-open if there was something we had to change to fix something, of course 👍

from nodejs-depd.

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.