Comments (8)
The eval
function is still a part of Node.js.
from nodejs-depd.
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.
Also, I had no problems in the past, this started happening recently.
from nodejs-depd.
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.
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.
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.
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.
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)
- Fail gracefully in unsupported browsers HOT 15
- Drop eval usage HOT 21
- line info is not help HOT 8
- Cannot redefine property: callSiteToString HOT 2
- Call-site calculation does not fail gracefully when Stack information is unavailable HOT 14
- Call site calculation fails when importing an esm'ed package that imports sequelize internally HOT 14
- Respect --no-deprecation and process.noDeprecation HOT 17
- Why is this library overwriting Error type? HOT 5
- Turkish Language Problem HOT 2
- Incopatibile with --enable-source-maps node 12 option HOT 7
- (!) Use of eval is strongly discouraged, rollup HOT 1
- compatibility with Node.js' source-map implementation HOT 12
- please rewrite nodejs-depd with modern syntax HOT 1
- Compatibility with --disallow-code-generation-from-strings HOT 9
- Use of eval() is strongly discouraged, as it poses security risks HOT 9
- Calling `process.cwd()` from index.js can be problematic HOT 4
- callSite.getFileName() is not Function HOT 5
- `callSite.getFileName` is not a function HOT 10
- NodeJS 20.11.0 fails when building snapshot.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs-depd.