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.

__VERSION__ undefined when import from node_modules

See original GitHub issue
  1. Simple import with webpack build return error in subj import HumanInput from 'humaninput' const hi = new HumanInput(window) hi.on('a', () => console.log(12345))
  2. U r using webpack DefinePlugin for defining __VERSION__
  3. main in package.json reference to lib/humaninput-full.js, where no __VERSION__
  4. In dist/humaninput-1.1.12.full.js all is ok

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
skochcommented, Jan 4, 2017

Any resolution on this?

import HumanInput from 'humaninput/dist/humaninput-full.min'; isn’t ideal.

0reactions
marwiecommented, May 29, 2018

would be interested as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing undefined npm module - Stack Overflow
I have published a npm package. It works fine when accessing via the global variable window.Router in the browser, but when I try...
Read more >
ts-node - npm
js. If you need to import uncompiled TypeScript in node_modules , use --skipIgnore or TS_NODE_SKIP_IGNORE to bypass this restriction.
Read more >
Import Bug with `npm install @babylonjs\inspector` (proposed ...
Error: node_modules/@babylonjs/inspector/dist/babylon.inspector.module.d.ts:4970:170 - error TS2307: Cannot find module './types' or its ...
Read more >
JavaScript modules - MDN Web Docs
With this mapping, if a script with an URL that contains /node_modules/dependency/ imports coolmodule , the version in ...
Read more >
Common Error Details - Snowpack
This warning appears when Snowpack believes something to be in node_modules , but can't find it. This typically happens because you've tried to...
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