javascript-obfuscator / javascript-obfuscator/gulp-javascript-obfuscator

Error: `parentNode` property of given node is `undefined`

Open
#15 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
103
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Just for some hours now, our gulp build process stopped working due to an error in `gulp-javascript-obfuscator`:
```
C:\...\node_modules\gulp-javascript-obfuscator\
node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\node\N
odeUtils.ts:237
throw new ReferenceError('`parentNode`property of given node is `un
defined`');
^
ReferenceError: `parentNode` property of given node is `undefined`
```
(Note that I have "..." the path to the actual folder.)

After quickly digging into the problem, I have found that `javascript-obfuscator` has release v0.17.0 just today (some hours) ago. If I manually downgrade inside the `gulp-javascript-obfuscator` the `javascript-obfuscator` to `0.16.0` (instead of `latest`) it works again. I know this cannot be the actual solution, but it could be a starting point however.

Any suggestions?
Thanks in advance.
Please, if more information is required from my side, tell me.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the gulp build with javascript-obfuscator 0.17.0 and compare it with the reported working 0.16.0 setup. Inspect the dependency behavior around the reported nodeUtils.ts:237 error; done means the plugin builds successfully with the affected dependency version or documents a compatible version constraint.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.