Issue
I have a TypeScript project to run on a Firebase function.
Here is my tsconfig.json
{
"compilerOptions": {
"lib": ["es2017"],
"module": "commonjs",
"noImplicitReturns": true,
"outDir": "dist",
"sourceMap": true,
"target": "es2017",
"esModuleInterop": true,
"strict": true
},
"include": ["src"],
"exclude": ["dist", "node_modules"]
}
When I build (npm run build, which runs tsc)
I got the error
node_modules/@types/glob/index.d.ts:29:42 - error TS2694: Namespace '"/opt/workspace/personal/kioskify-backend/functions/node_modules/minimatch/dist/cjs/index"' has no exported member 'IOptions'.
29 interface IOptions extends minimatch.IOptions {
EDIT: The error occurs in other modules. Full output:
npm run build
> build
> npm run lint && tsc
> lint
> eslint --fix .
node_modules/@types/glob/index.d.ts:29:42 - error TS2694: Namespace '"/opt/workspace/personal/kioskify-backend/functions/node_modules/minimatch/dist/cjs/index"' has no exported member 'IOptions'.
29 interface IOptions extends minimatch.IOptions {
~~~~~~~~
node_modules/@types/glob/index.d.ts:75:30 - error TS2724: '"/opt/workspace/personal/kioskify-backend/functions/node_modules/minimatch/dist/cjs/index"' has no exported member named 'IMinimatch'. Did you mean 'Minimatch'?
75 minimatch: minimatch.IMinimatch;
~~~~~~~~~~
node_modules/@types/rimraf/index.d.ts:33:21 - error TS2694: Namespace '"/opt/workspace/personal/kioskify-backend/functions/node_modules/glob/dist/mjs/index"' has no exported member 'IOptions'.
33 glob?: glob.IOptions | false | undefined;
~~~~~~~~
Found 3 errors in 2 files.
Errors Files
2 node_modules/@types/glob/index.d.ts:29
1 node_modules/@types/rimraf/index.d.ts:33
And other similar errors, what can be?
Solution
Removing rimraf
solved the issue.
Answered By - Rodrigo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.