Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on node 13.5.0 #452

Closed
sanex3339 opened this issue Dec 20, 2019 · 24 comments · Fixed by #453
Closed

Error on node 13.5.0 #452

sanex3339 opened this issue Dec 20, 2019 · 24 comments · Fixed by #453
Labels

Comments

@sanex3339
Copy link
Member

Error on node 13.5.0
https://travis-ci.com/javascript-obfuscator/javascript-obfuscator/jobs/269066094

Error: The number of constructor arguments in the derived class ObfuscationEventEmitter must be >= than the number of constructor arguments of its base class.
@sanex3339 sanex3339 added the bug label Dec 20, 2019
@sanex3339
Copy link
Member Author

Should replace events module on eventemitter3 module

@thisismydesign
Copy link

Got the same issue on Node.js 12.16.0. The fix works.

@PeterHdd
Copy link

Im still getting this issue

@sanex3339
Copy link
Member Author

What obfuscator version are you using?

@PeterHdd
Copy link

PeterHdd commented Jun 15, 2020

Latest one, I just did:

npm install --save-dev javascript-obfuscator

In package.json:

    "javascript-obfuscator": "^1.1.0",

After executing javascript-obfuscator ./www, I get the error.

The error:

Error: The number of constructor arguments in the derived class t must be >= than the number of constructor arguments of its base class.

@PeterHdd
Copy link

any idea?

@sanex3339
Copy link
Member Author

No. Try to completely remove your package-lock file and reinstall all packages from scratch

@sanex3339
Copy link
Member Author

Also show me the output of javascript-obfuscator -v command

@sanex3339 sanex3339 reopened this Jun 16, 2020
@sanex3339
Copy link
Member Author

Any news?

@thanhpcc96
Copy link

issue too!

@sanex3339
Copy link
Member Author

sanex3339 commented Jun 23, 2020

To everyone: try to remove package-lock.json and completely reinstall all your modules. Will it help?
This error does not reproduced on the Travis CI, so likely this is a problem related to outdated versions in package-lock.json

@sanex3339
Copy link
Member Author

Did you try this?

@sanex3339
Copy link
Member Author

I will close this issue. Create another one if this problem exists after removing of package-lock.json

@Eljoy
Copy link

Eljoy commented Jul 28, 2020

Facing the same issue using 1.8.1 version

@sanex3339
Copy link
Member Author

sanex3339 commented Jul 28, 2020

This error is not possible on 1.8.1 because I changed the package that was the reason for this error.
Are you sure that you're using 1.8.1?

Try to completely remove your package-lock file and reinstall all packages from scratch.
Also, show me the output of javascript-obfuscator -v command and your package.json file section with javascript-obfuscator version.

@Eljoy
Copy link

Eljoy commented Jul 28, 2020

Yes, my bad. I incorrectly overrode the nested dependency javascript-obfuscator dependency for react-native-obfuscating-transformer. Is there any chance that javascript-obfuscator can be updated for react-native-obfuscating-transformer any time soon? That would be a massive help to everyone using it.

@aureliopetrone
Copy link

I get the same issue using react-native-obfuscating-transformer

@sanex3339
Copy link
Member Author

As usual, try to completely remove your package-lock file and reinstall your dependencies.

Also, react native plugin is old, and you can use only obfuscator versions below 1.0.0.

@quantjamespecutus
Copy link

same issue with react-native-obfuscating-transformer here.

@sanex3339
Copy link
Member Author

sanex3339 commented Aug 26, 2020

Same answer, try to remove package-lock.json and reinstall dependencies. This package requires obfuscator versions ^0.13.0 and above, so it should install 0.28.5 version.

Also be aware that the latest actual version is 1.11.0 and this package does not supports it. Maybe it's a time to create the fork?

@sanex3339
Copy link
Member Author

@quantjamespecutus also react-native-obfuscating-transforner has issue about this problem:
javascript-obfuscator/react-native-obfuscating-transformer#35

@quantjamespecutus
Copy link

@quantjamespecutus also react-native-obfuscating-transforner has issue about this problem:
javascript-obfuscator/react-native-obfuscating-transformer#35

thanks, appreciate the help

@qq1170623178
Copy link

hello,when i use laset version and more version ,the error is "Cannot read property 'sourceAndMap' of undefined " so i use 0.18.3 ,that error is disappear,but error ‘The number of constructor arguments in the derived class ObfuscationEventEmitter must be >= than the number of constructor arguments of its base class.’,please help me

@sgshy1995
Copy link

When I use webpack-obfuscator@2.6.0, this issue shows. Can any methods to reslove it without removing yarn.lock or package-lock.json? Because after I remove it and install again, the webpack throws an error thatWebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema., it tells me that my config has some wrongs but I cant find it. I use javascript-obfuscator@latest and webpack@4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants