Create-react-app: 3.0 Various problems after setting baseUrl

Created on 23 Apr 2019  路  8Comments  路  Source: facebook/create-react-app

Various problems after setting baseUrl

This file is still using src
node_modules/react-scripts/config/paths.js

Error message
Error: ENOENT: no such file or directory, open '/Users/Jaydar/GitHub/xxxxx/src/react-app-env.d.ts'

1
2

low (ignored issue template) stale

All 8 comments

Please provide a reproducing project.

@gaearon hi , baseUrl is not completely open?

@Jaydar I believe baseUrl is configured on CRA to support only "src" and "node_modules" so you'd likely have to rename the "core" folder to "src"

Btw, if you are using vscode you have to restart the ts server after setting baseUrl

I am having similar issues. I was going to post an issue with a reproducible demo, but I can't reproduce is on a fresh CRA.

I noticed there is no documentation for baseUrl. Should we follow the documentation here, or has the CRA team done a custom implementation of jsonconfig? It would suck to lose baseUrl config in release notes.

EDIT: Created #6889

baseUrl is documented here: https://facebook.github.io/create-react-app/docs/importing-a-component#absolute-imports. The only property from jsconfig.json we're currently doing anything with is baseUrl. We will likely support additional features in the future like paths.

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

onelson picture onelson  路  3Comments

alleroux picture alleroux  路  3Comments

adrice727 picture adrice727  路  3Comments

barcher picture barcher  路  3Comments

JimmyLv picture JimmyLv  路  3Comments