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.

"Uncaught SyntaxError: missing ) after argument list" getting some ENV var

See original GitHub issue

Hi! I’m trying to configure some vars into my ENVIRONMENT files but it’s trow a console error. Here is my configuration:

/config/dev.env.js:

var merge = require('webpack-merge')
var prodEnv = require('./prod.env')

module.exports = merge(prodEnv, {
  NODE_ENV: '"development"',
  API_BASE_URL: '"foo"'
})

/src/main.js

...
console.log(process.env.API_BASE_URL)

Console display this error:


Uncaught SyntaxError: missing ) after argument list
    at Object.<anonymous> (app.js:1093)
    at __webpack_require__ (app.js:660)
    at fn (app.js:86)
    at Object.<anonymous> (app.js:1779)
    at __webpack_require__ (app.js:660)
    at app.js:709
    at app.js:712

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
tjunussovcommented, Oct 11, 2019

Same issue, here, but figured out,

You need to be very careful, with quotes VALUE:'"value"' needs to be in double quote

if you use variable you need to do like this VAR:'"'+myvar+'"'

2reactions
zhengkai2001commented, May 30, 2018

Just figured out - we need to stop the current process and do a rebuild in order to make the change work. For me, I just ctrl+C and npm run dev. Sorry for any disturbance

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: missing ) after argument list - JavaScript | MDN
The JavaScript exception "missing ) after argument list" occurs when there is an error with how a function is called. This might be...
Read more >
SyntaxError: missing ) after argument list in express
im running it in the vs code terminal do ...
Read more >
JavaScript SyntaxError: missing ) after argument list Solution
The “SyntaxError: missing ) after argument list” error is raised if a function call cannot be evaluated correctly. To fix this error, make...
Read more >
JavaScript SyntaxError - Missing ) after argument list
This JavaScript exception missing ) after argument list occurs if there is an error in function calls.
Read more >
SyntaxError: missing ) after argument list in JavaScript
The SyntaxError: missing ) after argument list occurs when we make a syntax error when calling a function, e.g. forget to separate its...
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