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.

ERR_INVALID_PACKAGE_TARGET

See original GitHub issue

The module fails to import with node v13.12.0. The version 2.1.0 still works fine.

sorunome@sorunome-desktop repos/mx-puppet-skype $ node ./build/index.js                                 1
internal/modules/cjs/loader.js:616
            if (e.code !== 'ERR_PACKAGE_PATH_NOT_EXPORTED') throw e;
                                                            ^

Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.js" defined in the package config /home/sorunome/repos/mx-puppet-skype/node_modules/is-promise/package.json
    at resolveExportsTarget (internal/modules/cjs/loader.js:574:13)
    at resolveExportsTarget (internal/modules/cjs/loader.js:613:20)
    at applyExports (internal/modules/cjs/loader.js:503:14)
    at resolveExports (internal/modules/cjs/loader.js:541:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:661:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:963:27)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/home/sorunome/repos/mx-puppet-skype/node_modules/lowdb/lib/main.js:4:17) {
  code: 'ERR_INVALID_PACKAGE_TARGET'
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:29
  • Comments:24 (2 by maintainers)

github_iconTop GitHub Comments

34reactions
SimonSchickcommented, Apr 25, 2020

Fyi, this is on hackernews, expect a lot attention/comments/shitposting.

30reactions
alexandernstcommented, Apr 25, 2020

😂 holy shit 😂 JS ecosystem is just utterly broken beyond any repair.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to create react app, wired error? - Stack Overflow
Try to complete uninstall node js by using revo uninstaller or delete AppData\Roaming\npm folder . I hope its will be working fine ....
Read more >
Error Codes | Yarn - Package Manager
A package must be rebuilt. This information message occurs when Yarn wishes to let you know that a package will need to be...
Read more >
Error [ERR_INVALID_PACKAGE_TARGET] for yarn create ...
js:438 throw e; ^ Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.js" defined in the package config /Users/andreitosa/.
Read more >
nodejs-api/ errors
const err = new Error('The message'); console.error(err.message); // Prints: ... The package.json "exports" field contains an invalid target ...
Read more >
NPM install error - Material Design for Bootstrap
npm ERR! A complete log of this run can be found in: npm ERR! ... Delete your node_modules catalog and package-lock.json file 2....
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 Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found