Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

TypeError: Cannot read property 'replace' of undefined - Not sure where it's originating as I don't use replace in the repo

$
0
0

When I run my expo project I am getting a console warning stating.

TypeError: Cannot read property 'replace' of undefined    at matchFileNameOrURLFromStackTrace (/usr/local/lib/node_modules/expo-cli/src/utils/matchFileNameOrURLFromStackTrace.ts:16:42)    at logStackTrace (/usr/local/lib/node_modules/expo-cli/src/exp.ts:548:31)    at logWithLevel (/usr/local/lib/node_modules/expo-cli/src/exp.ts:590:11)    at Object.write (/usr/local/lib/node_modules/expo-cli/src/exp.ts:656:13)

I am unsure where this is coming from as I only use replace is below but I have changed that and still get the error.

const makeURL = (url: string) => {    return `${API_URL}/${url?.replace(/^\/+/, '')}`;};

I have had a look for matchFileNameOrURLFromStackTrace and there are no traces of it anywhere.

Any help to be pointed in the right direction would be appreciated.

Cheers


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>