req
req copied to clipboard
req help, unexpected token error
Describe the bug I installed the req command and tried it, had the following error.
To Reproduce Steps to reproduce the behavior:
- Install the req cli with
npm i -g req-cli
- Create a .req directory with a sample.http file
GET https://api.github.com/users/SiddharthShyniben
- Run the command
req run sample
- Also run the command
req help
- See error
file:///home/user/.config/nvm/versions/node/v16.13.2/lib/node_modules/req-cli/src/index.js:41
const {version} = (await import('../package.json', {assert: {type: 'json'}})).default
^
SyntaxError: Unexpected token ','
at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:139:18)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:236:14)
at async link (node:internal/modules/esm/module_job:67:21)
Expected behavior A request should be sent with results on the github user's profile.
Versions (please complete the following information):
- OS: [e.g. ChromeOS]
-
req
: req version also gives the same error so cannot give detail here on the version of req in use