Typescript-react-starter: Failed to load tsconfig.json: Missing baseUrl in compilerOptions

Created on 27 Feb 2018  ·  2Comments  ·  Source: microsoft/TypeScript-React-Starter

When I run in VS Code terminal npm start I get:

react-scripts-ts start

Failed to load tsconfig.json: Missing baseUrl in compilerOptions
Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin
Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin

I've only added 'npm install --save react-bootstrap @types/react-bootstrap`

Most helpful comment

You can add "baseUrl": "." to your tsconfig.json:
{
"compilerOptions": {
"baseUrl": "."

},

All 2 comments

I can also reproduce this with

npx create-react-app my-t-app --scripts-version=react-scripts-ts
cd my-t-app
npm run build

Output of npm version:

{ 'my-t-app': '0.1.0',
  npm: '5.7.1',
  ares: '1.10.1-DEV',
  cldr: '32.0.1',
  http_parser: '2.7.0',
  icu: '60.2',
  modules: '57',
  nghttp2: '1.25.0',
  node: '8.9.4',
  openssl: '1.0.2n',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.15.0',
  v8: '6.1.534.50',
  zlib: '1.2.11' }

Output of npm ls --depth=0:

[email protected] /Users/Meligy/Code/temp/rct/my-t-app
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

You can add "baseUrl": "." to your tsconfig.json:
{
"compilerOptions": {
"baseUrl": "."

},

Was this page helpful?
0 / 5 - 0 ratings

Related issues

corydeppen picture corydeppen  ·  6Comments

painreign picture painreign  ·  6Comments

emanuelef picture emanuelef  ·  3Comments

user135711 picture user135711  ·  6Comments

wilomgfx picture wilomgfx  ·  6Comments