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.

[BUG] Getting internal error on fresh install of ts-prune

See original GitHub issue

Describe the bug Error on fresh project

› ts-prune       
/home/ben/.nvm/versions/node/v10.20.0/lib/node_modules/ts-prune/lib/analyzer.js:161
    var referencedInFile = Object.entries(referenceCounts).flatMap(function (_a) {
                                                           ^

TypeError: Object.entries(...).flatMap is not a function
    at Object.exports.getPotentiallyUnused (/home/ben/.nvm/versions/node/v10.20.0/lib/node_modules/ts-prune/lib/analyzer.js:161:60)
    at /home/ben/.nvm/versions/node/v10.20.0/lib/node_modules/ts-prune/lib/analyzer.js:191:21
    at Array.forEach (<anonymous>)

Additional context

version: 0.8.4
   node: 10.20.0
     OS: Ubuntu 64bit

tsconfig.json

{
  "compilerOptions": {
    "outDir": "dist",
    "module": "es2015",
    "moduleResolution": "node",
    "target": "es5",
    "lib": ["es6", "es2016", "dom"],
    "baseUrl": "src",
    "strict": true,
    "preserveConstEnums": true,
    "sourceMap": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "typeRoots": ["node_modules/@types", "src/types.d.ts"]
  },
  "include": ["src"],
  "exclude": ["node_modules", "dist"]
}

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
nadeeshacommented, Jan 11, 2021

Ah, this is annoying. Let me try and find a fix for this in the project itself.

1reaction
staff0rdcommented, Dec 29, 2020

Got the same, solved by bumping node version to one that supports flatmap. node v12+ works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug]: At fresh install on Vue3 + Vite can't build storybook ...
Describe the bug I did a fresh install of Vue 3 with Vite (with npm init vue@latest), ... run storybook I get this...
Read more >
Adobe Reader application crash after installing TSPrint
In case a user's Adobe Reader application is crashing after installing TSPrint on their server, follow this guide to resolve the issue.
Read more >
Communication Error Help | Terminalworks
Read this page to learn about all reasons why you receive a Communication Error message and instructions on how to resolve it. You...
Read more >
An internal error occurred. No error Code - Microsoft Community
When I try to install any new software towards the end of the installations I get a pop up box titled Installer Information....
Read more >
Bug #1838000 “error: *** run_installscript: internal error 0xFFF...”
During installation of SwatchBooker-0.7.3.setup.exe on WIN10, the last installation window showed the following error message ...
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