bluebird eval in toFastProperties triggers SyntaxError
See original GitHub issueI’m trying to use lavamoat with the plaid API, which uses bluebird. I can imagine bluebird does some sort of monkey-patching that doesn’t mesh well with lavamoat. Any advice on how to proceed?
To reproduce the issue, I used lavamoat-browserify-examples/00-simple-cli with a small tweak:
When I npm install; npm start
and load the page in my browser, I get some diagnostics that I struggle to make sense of:
internalRequire:551 LavaMoat - Error evaluating module "2" from package "bluebird"
internalRequire @ internalRequire:551
requireRelative @ internalRequire:638
requireRelativeWithContext @ internalRequire:605
eval @ VM318:2
internalRequire @ internalRequire:586
loadBundle @ internalRequire:3976
(anonymous) @ internalRequire:4658
internalRequire:588 LavaMoat - Error instantiating module "1" from package "<root>"
internalRequire @ internalRequire:588
loadBundle @ internalRequire:3976
(anonymous) @ internalRequire:4658
internalRequire:589 Uncaught SyntaxError: possible direct eval expression rejected around line 5561
at rejectSomeDirectEvalExpressions (internalRequire:1258)
at rejectDangerousSources (internalRequire:1267)
at Object.rewrite (internalRequire:1273)
at eval (eval at createSafeEvaluatorFactory (bundle.js:1337), <anonymous>:19:57)
at Array.reduce (<anonymous>)
at eval (eval at createSafeEvaluatorFactory (bundle.js:1337), <anonymous>:4:53)
at applyTransforms (eval at createSafeEvaluatorFactory (bundle.js:1337), <anonymous>:17:21)
at safeEvalOperation (internalRequire:1353)
at internalRequire:1425
at realmEvaluate (internalRequire:1650)
callAndWrapError @ VM268:79
evaluate @ VM275:54
internalRequire @ internalRequire:549
requireRelative @ internalRequire:638
requireRelativeWithContext @ internalRequire:605
eval @ VM318:2
internalRequire @ internalRequire:586
loadBundle @ internalRequire:3976
(anonymous) @ internalRequire:4658
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
bluebird eval in toFastProperties triggers SyntaxError · Issue #19 ...
I'm trying to use lavamoat with the plaid API, which uses bluebird. I can imagine bluebird does some sort of monkey-patching that doesn't...
Read more >How does Bluebird's util.toFastProperties function make an ...
This code is never // reached but even using eval in unreachable code causes v8 // to not optimize functions. }.
Read more >Warning for "unreachable expression after semicolon-less ...
It says "SyntaxError: unreachable expression after semicolon-less return statement", but the expression isn't actually unreachable, because the return is ...
Read more >ses - UNPKG
665, SyntaxError: NativeError('%SyntaxErrorPrototype%'), ... 2215, // (using eval) or by invoking a previously saved reference to the originals.
Read more >Free Automated Malware Analysis Service - Hybrid Analysis
Submit malware for free analysis with Falcon Sandbox and Hybrid Analysis technology. Hybrid Analysis develops and licenses analysis tools to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
we found a work-around using browserfy transforms:
const { makeStringTransform } = require(‘browserify-transform-tools’)
@dckc this workaround has been added into
lavamoat-browserify
on by default and uh not yet disable-able by an option