-
-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find a declaration file for module './vue-apollo' #278
Comments
It's because the vue-apollo file probably isn't a .ts file but a .js file. (and noExplicitAny is enabled) |
@leovanhaaren I don't understand, what do am I supposed to do? I tried to set "no-explicit-any" to false/true but it doesn't change anything 😢 |
It was on my side, because of To avoid the issue I just replace it by the standard require():
I also tried to convert Thanks |
I have this issue during usage of vue ui cli tool. I just built generic vue app based on TS and then installed vue-cli-plugin-apollo -> build failed with the mentioned error.
vue config module.exports = {
lintOnSave: false,
pluginOptions: {
apollo: {
enableMocks: true,
enableEngine: true
}
}
} default tsconfig {
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env",
"jest"
],
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
} Generated dependencies: "dependencies": {
"graphql-type-json": "^0.2.1",
"lowdb": "^1.0.0",
"mkdirp": "^0.5.1",
"shortid": "^2.2.8",
"vue": "^2.5.21",
"vue-apollo": "^3.0.0-beta.11",
"vue-class-component": "^6.0.0",
"vue-property-decorator": "^7.0.0",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
},
"devDependencies": {
"@types/jest": "^23.1.4",
"@vue/cli-plugin-babel": "^3.2.0",
"@vue/cli-plugin-e2e-nightwatch": "^3.2.0",
"@vue/cli-plugin-typescript": "^3.2.0",
"@vue/cli-plugin-unit-jest": "^3.2.0",
"@vue/cli-service": "^3.2.0",
"@vue/test-utils": "^1.0.0-beta.20",
"babel-core": "7.0.0-bridge.0",
"graphql-tag": "^2.9.0",
"lint-staged": "^8.1.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"ts-jest": "^23.0.0",
"typescript": "^3.0.0",
"vue-cli-plugin-apollo": "^0.19.1",
"vue-template-compiler": "^2.5.21"
}, Works only with these both settings in ts config: "allowJs": true,
"strict": false, |
Try adding the types in your compiler options, this should do. |
Hi,
I don't understand why but when I'm trying to serve the project I get:
That's really weird since you add TypeScript support in Decembrer #160 and that I checked types were
./node_modules/vue-apollo/types/
Do you have any idea to help me please 😃 ?
The text was updated successfully, but these errors were encountered: