question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot read property 'ecmaFeatures' of undefined

See original GitHub issue

G:\sites\flip-game\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\EspreeFacade.ts:82 throw new Error(errorMessage); ^ Error: Cannot read property 'ecmaFeatures' of undefined at Function.value (G:\sites\flip-game\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\EspreeFacade.ts:82:19) at Function.value (G:\sites\flip-game\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\EspreeFacade.ts:44:65) at e.value (G:\sites\flip-game\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\JavaScriptObfuscator.ts:154:34) at e.value (G:\sites\flip-game\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\JavaScriptObfuscator.ts:135:55) at Function.value (G:\sites\flip-game\node_modules\javascript-obfuscator\dist\webpack:\JavaScriptObfuscator\src\JavaScriptObfuscatorFacade.ts:27:85) at G:\sites\flip-game\node_modules\webpack-obfuscator\index.js:49:66 at Array.forEach (<anonymous>) at Compilation.<anonymous> (G:\sites\flip-game\node_modules\webpack-obfuscator\index.js:27:23) at next (G:\sites\flip-game\node_modules\tapable\lib\Tapable.js:204:14) at G:\sites\flip-game\node_modules\uglifyjs-webpack-plugin\dist\index.js:266:11 at step (G:\sites\flip-game\node_modules\uglifyjs-webpack-plugin\dist\uglify\index.js:90:11) at done (G:\sites\flip-game\node_modules\uglifyjs-webpack-plugin\dist\uglify\index.js:99:22) at G:\sites\flip-game\node_modules\uglifyjs-webpack-plugin\dist\uglify\index.js:105:15 at G:\sites\flip-game\node_modules\worker-farm\lib\farm.js:191:19 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! flip-game@1.0.0 build: node build/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the flip-game@1.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\hp\AppData\Roaming\npm-cache_logs\2018-05-05T18_46_22_525Z-debug.log`

Trying to obfuscate Vuejs code. Added the plugin to webpack.

Searched a lot for the solution. could not find any

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
cafe4itcommented, Sep 28, 2018

@shaji-Dev @cmiltone i try this and work for me the project created by vue-cli 3.0 package.json

"eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "@vue/standard"
    ],
    "rules": {},
    "parserOptions": {
      "parser": "babel-eslint",
      "ecmaFeatures": {
        "modules": true
      }
    }
  },

vue.config.js

/* eslint-disable no-labels */
/* eslint-disable no-unused-expressions */
var JavaScriptObfuscator = require('webpack-obfuscator')
module.exports = {
  configureWebpack: config => {
    if (process.env.NODE_ENV === 'production') {
      return {
        plugins: [
          new JavaScriptObfuscator({
            rotateUnicodeArray: true
          })
        ]
      }
    }
  }
}
0reactions
shaji-Devcommented, Jul 10, 2018

Is there any fix for this guys? I’m still getting the Error: Cannot read property 'ecmaFeatures' of undefined when obfuscating in Nodejs grammatically, but works fine in the terminal…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'ecmaFeatures' of undefined #10623
Getting Parsing error: Cannot read property 'ecmaFeatures' of undefined Tell us about your environment ESLint Version: 5.1.0 Node Version: ...
Read more >
parsing error: cannot read properties of undefined ... - You.com
I'm getting error Parsing error: Cannot read properties of undefined (reading 'map') on this line in my module file: import { StoreLocation, Location...
Read more >
Cannot read property 'name' of undefined Occurred while ...
Ok so I solved the problem. For some reason the prefer-csf rule of eslint-plugin-storybook causes this error.
Read more >
eslint/eslint - Gitter
This error "Cannot read property 'Scope' of undefined" triggers only on *.jsx files and always points to their very first line, but since...
Read more >
@justeat/gulp-build-fozzie - npm
... You may also find that you get an error when adding eslint which reads Parsing error: Cannot read property 'ecmaFeatures' of undefined...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found