"Uncaught SyntaxError: missing ) after argument list" getting some ENV var
See original GitHub issueHi! 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:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same issue, here, but figured out,
You need to be very careful, with quotes
VALUE:'"value"'
needs to be in double quoteif you use variable you need to do like this
VAR:'"'+myvar+'"'
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
andnpm run dev
. Sorry for any disturbance