import JS file - can’t find variable: location error


I’m having hard time importing a SDK file written in JS code.

I’m using React Native and Expo to make an app, and there’s no html file or native code in this project.

1. First Attempt :

 import * as kakao from "./kakao_sdk/KakaoSdk.js"

this caused an error saying

kakao can’t find variable: location error

2. Second Attempt :

I tried to use WebView, but in this case, I’m not sure how to make this codes working in my environment.
Below is the code I tried.

import * as React from "react";
import { WebView } from "react-native-webview";

export default class WebViewSample extends React.Component {
  render() {
    const html = `
          <script type="text/javascript" src='./kakao_sdk/KaKaoSdk.js'></script>
            Kakao.init('personal key will be here');
        some text that is not important now

    return (
        source={{ html, baseUrl: "" }}
        style={{ flex: 1 }}

This gives no error, but seems like script tag is not working at all.

Any help would be appreciated. Thank you.