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

JSON parsing error #4763

Closed
ynigoreyes opened this issue Jul 11, 2018 · 1 comment
Closed

JSON parsing error #4763

ynigoreyes opened this issue Jul 11, 2018 · 1 comment

Comments

@ynigoreyes
Copy link

Is this a bug report?

Yes

$ node -v
v10.4.1

$ yarn -v
1.7.0

Environment

using react-app-rewired and react-scripts-ts

Steps to Reproduce

Cannot reproduce steps as it seemed to happen randomly

I was restructuring src and had to restart webpackdev server and it broke

Expected Behavior

Recompile without errors

Actual Behavior

MiggyMBA:hackwestx-web-app miggy$ yarn start
yarn run v1.7.0
$ npm-run-all -p watch-css start-js
$ npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive
$ react-app-rewired start --scripts-version react-scripts-ts

hackwestx-web-app@0.1.0 build-css /Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app
node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/

Wrote 5 CSS files to /Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/src/
=> changed: /Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/src/index.scss
=> changed: /Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/src/pages/AppLayout.scss
=> changed: /Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/src/pages/components/ClockComponent/Clock.scss
=> changed: /Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/src/pages/EventsPage/Events.scss
=> changed: /Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/src/pages/HomePage/Home.scss
undefined:22
},
^

SyntaxError: Unexpected token } in JSON at position 490
at JSON.parse ()
at loadTsconfig (/Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/node_modules/tsconfig-paths/lib/tsconfig-loader.js:72:23)
at loadSyncDefault (/Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/node_modules/tsconfig-paths/lib/tsconfig-loader.js:27:18)
at tsConfigLoader (/Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/node_modules/tsconfig-paths/lib/tsconfig-loader.js:13:22)
at configLoader (/Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/node_modules/tsconfig-paths/lib/config-loader.js:27:22)
at Object.loadConfig (/Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/node_modules/tsconfig-paths/lib/config-loader.js:8:12)
at new TsconfigPathsPlugin (/Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/node_modules/tsconfig-paths-webpack-plugin/lib/plugin.js:20:42)
at Object. (/Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/node_modules/react-scripts-ts/config/webpack.config.dev.js:127:7)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/Users/miggy/Dropbox/CodeBase/GitHub - Cloud/hackwestx-web-app/node_modules/react-app-rewired/scripts/start.js:9:23)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with signal "SIGTERM".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "start-js" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@ynigoreyes
Copy link
Author

FIX:

you cannot have trailing commas in tsconfig.json

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant