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.

Import is failing in my VueJS application

Steps to reproduce:

import printJS from 'print-js'

  printable: {'name': 'Test', 'description': '1g', 'quantity': 4},
  properties: ['name', 'description', 'quantity'],
  type: 'json'

Error: TypeError: print_js__WEBPACK_IMPORTED_MODULE_1___default(...) is not a function[Learn More]

Issue Analytics

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

github_iconTop GitHub Comments

stefanoriecommented, Aug 29, 2018

Great, that works perfectly! Thanks for the help.

I did need to add declare var printJS: any; so TypeScript knows it’s a global variable.

crabblycommented, Sep 22, 2018

Just published a new version to npm which has proper support for module import. The library will still expose a global variable printJS, but the recommend usage now should be to import the package at the same file where it will be used:

For ex.:

import printJS from 'print-js'


Run npm update print-js to get the latest version.

Thx to @gabrielmdeal and @samtsai

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import issues | Atlassian Support
Learn more on how to import issues, generate backup files and import these files in Jira Cloud.
Read more >
Importing issues from CSV - GitLab Docs
The user uploading the CSV file is set as the author of the imported issues. You must have at least the Developer role...
Read more >
Importer - Linear Guide
The issue migration assistant is our built-in importer that guides you through the process of importing issues to Linear from Asana, Jira, Shortcut...
Read more >
Import Issues | JetBrains Space Documentation
The script lets you import issues from a YouTrack instance (Standalone or inCloud) into a Space project. For each issue, you can import...
Read more >
Data import issues - Google Workspace Admin Help
Here's how to troubleshoot problems you might have when using Google Workspace Sync for Microsoft Outlook (GWSMO) to import data to your Google...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found