Vuex: Typscript compile error - logger.d.ts missing in NPM package

Created on 29 Jun 2020  路  2Comments  路  Source: vuejs/vuex

Version

3.5.0

Reproduction link

https://jsfiddle.net/chrisvfritz/50wL7mdz/

Steps to reproduce

Create default typescript project:

vue create test

? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, TS, Router, Vuex, Linter
? Use class-style component syntax? No
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? Yes
? Use history mode for router? (Requires proper server setup for index fallback in production) No
? Pick a linter / formatter config: Prettier
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files

cd test
npm run serve

What is expected?

Expects to compile without errors.

What is actually happening?

ERROR in D:/test/node_modules/vuex/types/index.d.ts(7,26):
7:26 Cannot find module './logger' or its corresponding type declarations.
5 |
6 | import { mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers } from "./helpers";

7 | import createLogger from "./logger";
| ^
8 |
9 | export * from "./helpers";
10 | export * from "./logger";
ERROR in D:/test/node_modules/vuex/types/index.d.ts(10,15):
10:15 Cannot find module './logger' or its corresponding type declarations.
8 |
9 | export * from "./helpers";
10 | export * from "./logger";


logger.d.ts file is missing in types folder when installed via npm.

bug types

Most helpful comment

Thanks for the report! I've confirmed it. Will make a fix in a moment!

All 2 comments

Sorry I don't know how to create a repo in JSFiddle for TS project. Basically logger.d.ts is missing in the 3.5.0 npm package resulting in TS compile error.

image

Thanks for the report! I've confirmed it. Will make a fix in a moment!

Was this page helpful?
0 / 5 - 0 ratings