joshswan/react-native-autolink

Failed to parse source map

Closed this issue ยท 3 comments

Hi,
great component that is really to integrate in an existing application ! Thanks

But, anyway, a small problem when one is trying to build a Web application in React Native/Expo. I run the command npx expo export:web that builds the Web application with Webpack and I get some warning log:

Failed to parse source map from '/app/node_modules/autolinker/src/anchor-tag-builder.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/anchor-tag-builder.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/autolinker.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/autolinker.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/html-tag.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/html-tag.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/htmlParser/parse-html.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/htmlParser/parse-html.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/index.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/index.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/match/email-match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/email-match.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/match/hashtag-match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/hashtag-match.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/match/index.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/index.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/match/match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/match.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/match/mention-match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/mention-match.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/match/phone-match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/phone-match.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/match/url-match.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/match/url-match.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/matcher/email-matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/email-matcher.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/matcher/hashtag-matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/hashtag-matcher.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/matcher/index.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/index.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/matcher/matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/matcher.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/matcher/mention-matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/mention-matcher.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/matcher/phone-matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/phone-matcher.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/matcher/tld-regex.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/tld-regex.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/matcher/url-match-validator.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/url-match-validator.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/matcher/url-matcher.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/matcher/url-matcher.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/regex-lib.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/regex-lib.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/truncate/truncate-end.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/truncate/truncate-end.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/truncate/truncate-middle.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/truncate/truncate-middle.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/truncate/truncate-smart.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/truncate/truncate-smart.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/utils.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/utils.ts'

Failed to parse source map from '/app/node_modules/autolinker/src/version.ts' file: Error: ENOENT: no such file or directory, open '/app/node_modules/autolinker/src/version.ts'

Seems like something is amiss with your webpack config because those files definitely don't exist and I'm not sure why it's looking for them. The autolinker dependency in node_modules only has dist JS files (and some .d.ts).

Closing as this seems unrelated to this lib but happy to reopen if needed.

I am using the default Webpack configuration embedded into the Expo Web build and I did not changed anything. Probably that they ignore the .d.ts files and they expect to find only .ts files ... not sure about this. I will try to investigatye and if I find something I will keep you informed ๐Ÿ™‚

I just had a look in the Expo issues and I found expo/expo#23296 that seems to be related with this problem ๐Ÿ™‚
Thanks