-
Notifications
You must be signed in to change notification settings - Fork 11
compilerOptions.paths must not be set (aliased imports are not supported) #34
Comments
I'm not seeing this, but IIRC, it did give me trouble. I suspect that if you add trailing slashes to the baseUrl in one/both of |
And to suppress the STERR output related to this (in Bash):
|
Same problem here. Edit: The suggested fix does not seem to work either. The problem is coming from CRA: See this issue: facebook/create-react-app#8909 |
The workaround by @beingtyson works for me to use the defined aliases, but I still got the same error: Nevertheless this workaround works better for me than ejecting CRA. |
This is because
/* eslint-disable */
const path = require('path')
const fs = require('fs')
rewrite('node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js',
c => c.replace("paths: { value:", "// paths: { value:")
)
function rewrite(path0, fn) {
const path1 = path.resolve(__dirname, '../', path0)
const contentBefore = fs.readFileSync(path1).toString()
const content = fn(contentBefore)
fs.writeFileSync(path1, content)
}
node tools/fix-alias.js
|
@xcfox awesome! this solves my issue with the warning. thanks |
@julix-unity |
Here's my setup:
Then, I created a
tsconfig.paths.json
:Finally, my
craco
config:And yet:
Why?
The text was updated successfully, but these errors were encountered: