Argument `--parameter-values` gives JSON parse error
See original GitHub issueRunning with the option --parameter-values
as documented does not work, but gives a JSON parse exception:
PS C:\my-dir> npx angular-prerender --parameter-values '{":name":["amelia","oliver"]}'
Opties:
--version Toon versienummer [booleaans]
--help Toon help [booleaans]
--browser-target specify the target inside your angular.json file which is
used to build the single page app
[string] [standaard: "build"]
--config specify the path to the angular.json file
[string] [standaard:
"C:\mydir\angular.json"]
--parameter-values specify the parameter values which should be replaced with
the parameter in the routes [string] [standaard: "{}"]
--server-target specify the target inside your angular.json file which is
used to build the server side code
[string] [standaard: "server"]
--verbose, -v set this flag if you prefer more detailed log messages
[booleaans] [standaard: false]
Unexpected token : in JSON at position 1
I tried other ways but did not yet succeed, except with an empty map: PS C:\my-dir> npx angular-prerender --parameter-values '{}'
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >Getting Error in JSON Parsing while sending an JSON object ...
So let's create a JSONObject in your client and add it to the parameters list: // Let's build the JSONObject we want to...
Read more >JSON Parser error in Amplify · Issue #6097 - GitHub
Amplify gives JSON parser error when we deploy the code to new AWS ... Infact the only thing I do have is a...
Read more >SyntaxError: JSON.parse: bad parsing Breaking Your Code ...
The JSON Parse error, as the name implies, surfaces when using the JSON.parse() method that fails to pass valid JSON as an argument....
Read more >Catching Invalid JSON Parse Errors with Rack Middleware
Example errors. The error thrown by the parameter parsing middleware behaves differently depending on your version of Rails: 3.2 throws a 500 ...
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 FreeTop 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
Top GitHub Comments
I just found out what is a solution here: enclose the value in double quotes like this:
Wow, I’m glad you found a solution. I added a small paragraph to the readme to mention that escaping might be an issue.