__VERSION__ undefined when import from node_modules
See original GitHub issue- Simple import with webpack build return error in subj
import HumanInput from 'humaninput' const hi = new HumanInput(window) hi.on('a', () => console.log(12345))
- U r using webpack DefinePlugin for defining
__VERSION__
- main in package.json reference to lib/humaninput-full.js, where no
__VERSION__
- In dist/humaninput-1.1.12.full.js all is ok
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any resolution on this?
import HumanInput from 'humaninput/dist/humaninput-full.min';
isn’t ideal.would be interested as well