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.

ReferenceError: Given config path must be a valid file path

See original GitHub issue

Not sure what mistake I’m making but I’ve tried giving it relative (to curr working dir), absolute, and input file dir. However, it keeps throwing this error.

The contents are copy and paste of all possible params in Readme.

cd /text

./node_modules/javascript-obfuscator/bin/javascript-obfuscator ./tmp/js.merged.js --config obfuscator.js 

/text/node_modules/javascript-obfuscator/dist/webpack:/src/cli/utils/CLIUtils.ts:58
                throw new ReferenceError('Given config path must be a valid file path');
                      ^
ReferenceError: Given config path must be a valid file path
    at Function.value (/text/node_modules/javascript-obfuscator/dist/webpack:/src/cli/utils/CLIUtils.ts:58:23)
    at e.value (/text/node_modules/javascript-obfuscator/dist/webpack:/src/cli/JavaScriptObfuscatorCLI.ts:178:93)
    at e.value (/text/node_modules/javascript-obfuscator/dist/webpack:/src/cli/JavaScriptObfuscatorCLI.ts:376:58)
    at e.value (/text/node_modules/javascript-obfuscator/dist/webpack:/src/cli/JavaScriptObfuscatorCLI.ts:354:35)
    at e.value (/text/node_modules/javascript-obfuscator/dist/webpack:/src/cli/JavaScriptObfuscatorCLI.ts:168:35)
    at Function.value (/text/node_modules/javascript-obfuscator/dist/webpack:/src/JavaScriptObfuscatorFacade.ts:42:5)
    at Object.<anonymous> (/text/node_modules/javascript-obfuscator/bin/javascript-obfuscator:3:26)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)

also,

cat ./obfuscator.js 
{
    compact: true,
    controlFlowFlattening: false,
    controlFlowFlatteningThreshold: 0.75,
    deadCodeInjection: false,
    deadCodeInjectionThreshold: 0.4,
    debugProtection: false,
    debugProtectionInterval: false,
    disableConsoleOutput: false,
    domainLock: [],
    identifierNamesGenerator: 'hexadecimal',
    identifiersPrefix: '',
    log: false,
    renameGlobals: false,
    reservedNames: [],
    rotateStringArray: true,
    seed: 0,
    selfDefending: false,
    sourceMap: false,
    sourceMapBaseUrl: '',
    sourceMapFileName: '',
    sourceMapMode: 'separate',
    stringArray: true,
    stringArrayEncoding: false,
    stringArrayThreshold: 0.75,
    target: 'browser',
    transformObjectKeys: false,
    unicodeEscapeSequence: false
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sanex3339commented, Feb 15, 2018

I’ll check it.

1reaction
sanex3339commented, Feb 15, 2018

Wow, it’s very strange.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotenv file is not loading environment variables - Stack Overflow
config () --> It was showing me "c:\users\..\controller\.env". Really weired, why it is referencing controller folder instead root path. But when tried with...
Read more >
Accelerated Computing - NVIDIA Developer Forums
AssertionError: Config path must be a valid unix path. No file found at: /root/.docker/config.json. Did you run docker login?
Read more >
Configuring Jest
Thresholds for globs are applied to all files matching the glob. If the file specified by path is not found, an error is...
Read more >
Configuring package.json · Jest
When using the --config option, the JSON file must not contain a "jest" key: ... If a given module's path matches any of...
Read more >
Troubleshooting Common Errors - Gatsby
Error: ReferenceError: window is not defined when running gatsby build; Build problems from Field 'browser' doesn't contain a valid alias configuration ...
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