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.

Module not found: 'print.js'

See original GitHub issue

I’m trying to import the lib in es6 like this:

import printJS from 'print.js'
printJS()

But I get:

Uncaught Error: Cannot find module "print.js"
    at webpackMissingModule

Tried it on the latest v1.0.18 version

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:28 (9 by maintainers)

github_iconTop GitHub Comments

9reactions
sanderdebruijnecommented, Jun 9, 2017

@Kuchiriel I had the same issue, maybe this helps you as well:

// This import fails
import printJS from 'node_modules/print.js/src/index.js';

// This import works fine
import printjs from 'print.js/src';

// This import works fine
import printjs from 'print.js/dist/print.min.js';
3reactions
crabblycommented, Feb 8, 2018

@nsksaisaravana @nicolas-schreiber , Thanks for pointing this error. It has been fixed. Run npm update print-js to get the new release. It was just published. Please let me know if you still get any errors after that. Thx again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing print.js using webpack - javascript - Stack Overflow
I am trying to import the print.js library into the vendor bundle in my project using webpack. For some reason it cannot resolve...
Read more >
print-js - npm
A tiny javascript library to help printing from the web.. Latest version: 1.6.0, last published: 2 years ago. Start using print-js in your ......
Read more >
JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax.
Read more >
Module Federation - webpack
Remote modules are modules that are not part of the current build but are loaded at runtime from a remote container. Loading remote...
Read more >
ModuleNotFoundError: no module named Python Error [Fixed]
you are importing a module using the wrong path. How to fix the ModuleNotFoundError in Python. As I mentioned in the previous section,...
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