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
The issue has been fixed (https://github.com/expo/expo-cli/issues/3473).
npm i -g expo-cli and that has solved the error for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With