Problem on Vue CLI@3, Apollo and TypeScript (import { createProvider } from "./vue-apollo")?

I tried Vue CLI 3, Apollo, Typescript.
Get error

ERROR in /Volumes/DATA/TestApp/vue-apollo-type/src/main.ts
----
import { createProvider } from "./vue-apollo";
...

Please help me

Woudl be helpful to see the actual error message, but you left it out.

@LinusBorg thanks for your reply.
I am a newbie for Vue CLI, Typescript and Apollo.
Get error

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.2.1 <3.6.0

YOUR TYPESCRIPT VERSION: 3.6.3

Please only submit bug reports when using the officially supported version.

=============
.....
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR in /Volumes/DATA/TestApp/hello-vue-type/src/main.ts
5:32 Could not find a declaration file for module './vue-apollo'. '/Volumes/DATA/TestApp/hello-vue-type/src/vue-apollo.js' implicitly has an 'any' type.
    3 | import router from "./router";
    4 | import store from "./store";
  > 5 | import { createProvider } from './vue-apollo'
      |                                ^
    6 |
    7 | Vue.config.productionTip = false;
    8 |
ERROR in /Volumes/DATA/TestApp/hello-vue-type/src/main.ts
12:3 No overload matches this call.
  Overload 1 of 3, '(options?: ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never> | undefined): CombinedVueInstance<Vue, object, object, object, Record<never, any>>', gave the following error.
    Argument of type '{ router: VueRouter; store: Store<{}>; apolloProvider: any; render: (h: CreateElement) => VNode; }' is not assignable to parameter of type 'ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never>'.
      Object literal may only specify known properties, and 'apolloProvider' does not exist in type 'ThisTypedComponentOptionsWithArrayProps<Vue, object, object, object, never>'.
  Overload 2 of 3, '(options?: ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object> | undefined): CombinedVueInstance<Vue, object, object, object, Record<never, any>>', gave the following error.
    Argument of type '{ router: VueRouter; store: Store<{}>; apolloProvider: any; render: (h: CreateElement) => VNode; }' is not assignable to parameter of type 'ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object>'.
      Object literal may only specify known properties, and 'apolloProvider' does not exist in type 'ThisTypedComponentOptionsWithRecordProps<Vue, object, object, object, object>'.
  Overload 3 of 3, '(options?: ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>> | undefined): CombinedVueInstance<...>', gave the following error.
    Argument of type '{ router: VueRouter; store: Store<{}>; apolloProvider: any; render: (h: CreateElement) => VNode; }' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>'.
      Object literal may only specify known properties, and 'apolloProvider' does not exist in type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>'.
    10 |   router,
    11 |   store,
  > 12 |   apolloProvider: createProvider(),
       |   ^
    13 |   render: h => h(App)
    14 | }).$mount("#app");
    15 |
Version: typescript 3.6.3
Time: 3863ms

  App running at:
  - Local:   http://localhost:8080/
  - Network: http://192.168.1.11:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

My package

{
  "name": "hello-vue-type",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^2.6.5",
    "vue": "^2.6.10",
    "vue-apollo": "^3.0.0-beta.11",
    "vue-class-component": "^7.0.2",
    "vue-property-decorator": "^8.1.0",
    "vue-router": "^3.0.3",
    "vuex": "^3.0.1"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.11.0",
    "@vue/cli-plugin-eslint": "^3.11.0",
    "@vue/cli-plugin-typescript": "^3.11.0",
    "@vue/cli-service": "^3.11.0",
    "@vue/eslint-config-prettier": "^5.0.0",
    "@vue/eslint-config-typescript": "^4.0.0",
    "babel-eslint": "^10.0.1",
    "eslint": "^5.16.0",
    "eslint-plugin-prettier": "^3.1.0",
    "eslint-plugin-vue": "^5.0.0",
    "graphql-tag": "^2.9.0",
    "node-sass": "^4.9.0",
    "prettier": "^1.18.2",
    "sass-loader": "^7.1.0",
    "typescript": "^3.4.3",
    "vue-cli-plugin-apollo": "^0.21.0",
    "vue-template-compiler": "^2.6.10"
  }
}

Could you help me?

I thinks that the problem is vue-apollo.js is Javascript file import?

Now I tried update tsconfig

"allowJs": true

And then don’t show error.
Please advise?

that’s the issue, yes. It’s not Typescript so TS doesn’t know what types the imorts from this file do are.

The best thing would be to to either turn it into a ts file and properly type it or write a declaration file for it.

thanks again, but I am a newbie for Typescript.