Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token / in JSON at position 58 #1338

Closed
metawrap-dev opened this issue Aug 6, 2020 · 2 comments
Closed

Unexpected token / in JSON at position 58 #1338

metawrap-dev opened this issue Aug 6, 2020 · 2 comments

Comments

@metawrap-dev
Copy link

metawrap-dev commented Aug 6, 2020

If I run nyc I get the error

Unexpected token / in JSON at position 58

Expected Behavior

It executes.

Observed Behavior

Unexpected token / in JSON at position 58

Environment

System:
OS: Linux 4.19 Ubuntu 20.04.1 LTS (Focal Fossa)
CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Memory: 1.38 GB / 7.70 GB
Binaries:
Node: 14.3.0 - ~/.nvm/versions/node/v14.3.0/bin/node
Yarn: 1.13.0 - /mnt/c/Users/james/AppData/Roaming/npm/yarn
npm: 6.14.7 - ~/.nvm/versions/node/v14.3.0/bin/npm
npmPackages:
@babel/cli: ^7.10.5 => 7.10.5
@babel/core: ^7.10.5 => 7.10.5
@babel/plugin-transform-async-to-generator: ^7.10.4 => 7.10.4
@babel/plugin-transform-runtime: ^7.10.5 => 7.10.5
@babel/polyfill: ^7.10.4 => 7.10.4
@babel/preset-env: ^7.10.4 => 7.10.4
@babel/runtime: ^7.10.5 => 7.10.5
@types/source-map-support: ^0.5.2 => 0.5.2
babel-plugin-source-map-support: ^2.1.2 => 2.1.2
grunt-babel: ^8.0.0 => 8.0.0
grunt-mocha-istanbul: ^5.0.2 => 5.0.2
nyc: ^15.1.0 => 15.1.0
remap-istanbul: ^0.13.0 => 0.13.0
source-map-support: ^0.5.19 => 0.5.19
ts-node: ^8.10.2 => 8.10.2
typescript: ^3.9.7 => 3.9.7

@coreyfarrell
Copy link
Member

You have a broken JSON file that is needed to start nyc. This is not a bug in nyc.

@jpSimkins
Copy link

jpSimkins commented Feb 17, 2021

Just to help out others that are new to nyc, this is most likely due to copying the example .nycrc file and you need to remove the comments as there are no comments allowed in json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants