Git Product home page Git Product logo

Comments (6)

brockme avatar brockme commented on May 27, 2024

I'm still seeing this issue- did someone confirm it was resolved?

webpack 4.27.0
webpack-obfuscator 1.2.1
aurelia-cli 1.2.3

PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/src/decorators/Initializable.ts:45
|| initializablePropertiesSet.has(propertyName)
^
TypeError: Cannot read property 'has' of undefined
at forEach (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/src/decorators/Initializable.ts:45:43)
at Array.forEach ()
at wrapTargetMethodsInInitializedCheck (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/src/decorators/Initializable.ts:38:22)
at PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/src/decorators/Initializable.ts:23:9
at DecorateProperty (PROJECT_ROOT_FOLDER/node_modules/reflect-metadata/Reflect.js:553:33)
at Object.decorate (PROJECT_ROOT_FOLDER/node_modules/reflect-metadata/Reflect.js:123:24)
at __decorate (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/src/custom-code-helpers/console-output/group/ConsoleOutputCodeHelperGroup.ts:4:92)
at Object.call (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/src/custom-code-helpers/console-output/group/ConsoleOutputCodeHelperGroup.ts:78:1)
at r (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/webpack/bootstrap:19:22)
at Object.call (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/src/container/modules/custom-code-helpers/CustomCodeHelpersModule.ts:9:40)
at r (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/webpack/bootstrap:19:22)
at Object.call (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/src/container/InversifyContainerFacade.ts:10:35)
at r (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/webpack/bootstrap:19:22)
at Object.call (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/src/JavaScriptObfuscatorFacade.ts:7:36)
at r (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/webpack/bootstrap:19:22)
at Object. (PROJECT_ROOT_FOLDER/node_modules/javascript-obfuscator/dist/webpack:/JavaScriptObfuscator/index.ts:3:38)

from webpack-obfuscator.

sanex3339 avatar sanex3339 commented on May 27, 2024

What node version have you used?

from webpack-obfuscator.

brockme avatar brockme commented on May 27, 2024

I'm using node 10.15.3

Thanks for the quick response! :)

from webpack-obfuscator.

sanex3339 avatar sanex3339 commented on May 27, 2024

I need a repo with a small reproducible example

from webpack-obfuscator.

brockme avatar brockme commented on May 27, 2024

I've recreated the bug in a new project here: https://github.com/brockme/aurelia-obfuscator-io-broken
There are a few more relevant details in the readme- but please let me know if there's anymore info I can provide!

from webpack-obfuscator.

peitschie avatar peitschie commented on May 27, 2024

Turns out this breakage is caused by the aurelia-polyfills, which get loaded by the aurelia-cli (i.e., au build) commands.
The polyfill is only partial, and ends up confusing reflect-metadata which attempts to polyfill the remaining Reflect methods. leaving everything in a very broken state.

Most noticeable is that Reflect.defineMetadata is supplied by aurelia-polyfills, but Reflect.getMetadata is defined by reflect-metadata... meaning you can't read the value you set!

I don't have a real fix, but I can get this plugin to work if I add the line require('reflect-metadata') to the top of the imported aurelia-polyfills file.

Nasty little thing to solve though!

from webpack-obfuscator.

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.