foundation kits list from terminal not working and throw fetching file kits.json file.
Closed this issue · 1 comments
What should happen?
foundation kits list should show a list of kits available.
...
What happens instead?
error fetching file /building-blocks/data/kits.json
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at C:\Users\Ravi Lodhiya\AppData\Roaming\npm\node_modules\foundation-cli\lib\commands\kits.js:41:21
at IncomingMessage. (C:\Users\Ravi Lodhiya\AppData\Roaming\npm\node_modules\foundation-cli\lib\util\fetch-url.js:21:9)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
...
Possible Solution
\foundation-cli\lib\commands\kits.js line number 40
should be corrected as below
fetchUrl('get.foundation', '/building-blocks/data/kits.json', function(kitJson) {
...
I would suggest not to use hardcoded values instead of use config base so that it becomes more modular
Test Case and/or Steps to Reproduce (for bugs)
Test Case:
How to reproduce:
1.
2.
3.
Context
...
Your Environment
- Foundation version(s) used: v2.2.5
- Browser(s) name and version(s):
- Device, Operating System and version: Windows 10 Pro 64 bit
- Link to your project:
Checklist
- I have read and follow the CONTRIBUTING.md document.
- There are no other issues similar to this one.
- The issue title and template are correctly filled.