question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

definition files are not generated -- can't repro

See original GitHub issue

I could not generate *.d.ts files using rollup-plugin-typescript2. I set declaration flag to true in tsconfig.json. The documentation of plugin says it must work however it did not.

{
    "compilerOptions": {
        "typeRoots": ["node_modules/@types"],
        "types": ["jquery", "angular", "lodash", "jasmine", "angular-mocks"],
        "allowUnreachableCode": false,
        "allowUnusedLabels": false,
        "baseUrl": "./src",
        "forceConsistentCasingInFileNames": true,
        "module": "commonjs",
        "moduleResolution": "node",
        "noImplicitAny": true,
        "noImplicitReturns": true,
        "preserveConstEnums": false,
        "target": "es5",
        "sourceMap": false,
        "declaration": true
    },
    "include": [
        "src/module.ts",
        "src/**/*.ts"
    ],
    "exclude": [
        "src/test/*.ts"
    ]
}

Any help would be much appreciated

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JackieManujacommented, May 26, 2022

tsconfig

{
    "compilerOptions": {
      "target": "es5",
      "module": "commonjs",
      "moduleResolution": "node",
      "strict": true,
      "jsx": "react",
      "declaration": true, 
      "declarationDir": "/type",
      "allowSyntheticDefaultImports": true,
    } 
}

Rollup config

      input:'./tmp/coe/core/Hello.tsx',
      output: {         
        format: 'es',
        sourcemap: true       
      },
      plugins: [        
        typescript({            
            tsconfig: "./tmp/coe/core/tsconfig.json",
            verbosity: 3,
            cacheRoot: './build_cache' 
        })
      ],
      external: ['react']

Still declaration files are not generated

Can anyone help?

0reactions
agilgur5commented, May 26, 2022

OP never responded with more info and no repro was ever provided.

This plugin has evolved pretty significantly since then, so if you’re experiencing a similar issue, please open a new issue and provide a reproduction for debugging purposes. It is typically easier for maintainers to track that way as opposed to comments on old issues that may even have similar errors but different root causes.

Locking as such

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing Bugs - If You Can't Reproduce a Bug, You Can't Fix It
If you can't reproduce it, then you are only guessing at what's wrong, and that means you are only guessing that your fix...
Read more >
repro | Data Version Control - DVC
Description. Provides a way to regenerate data pipeline results, by restoring the dependency graph implicitly defined by the stages listed in dvc.yaml ....
Read more >
Why are reproduction steps helpful for fixing software bugs?
It means the developer won't give up if he tried it out three times and the bug didn't appear if he knows it...
Read more >
[Webpack 5] (minimal repro included!) __webpack_modules ...
Specifically dev server client is being exported instead of the given entry. Since its export is an empty object that's where Cannot read ......
Read more >
Providing Reproduction Steps - Phabricator
When you submit a bug report about Phabricator, you MUST include reproduction steps. We can not help you with bugs we can not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found