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.

Production environment library method does not exist

See original GitHub issue

Describe the bug

Production environment htmldiff execute function is undefined

Reproduction

https://stackblitz.com/edit/vitejs-vite-pisuhy?file=main.js

System Info

null

Used Package Manager

pnpm

Logs

$ vite build
$ cd dist
$ pnpx live-server

Validations

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

5reactions
huzedong2015commented, Aug 3, 2022

The workaround that I did for this issue was to do something like:

import $htmlDiff from "htmldiff-js";
const htmlDiff = $htmlDiff.default || htmlDiff

But it feels a little bit tricky. So I hope you can solve this problem soon.

I think this can only be used as an emergency measure, which should be handled by the plug-in to keep the dev and pro environments consistent

2reactions
davbritocommented, Aug 2, 2022

The workaround that I did for this issue was to do something like:

import $htmlDiff from "htmldiff-js";
const htmlDiff = $htmlDiff.default || htmlDiff

But it feels a little bit tricky. So I hope you can solve this problem soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration 'production' could not be found in project 'my-lib'
It is present for the application project only. the following is what I have under the build configuration for library project that uses...
Read more >
Libraries in development repository vs. production repository
Update: I have just done some testing; I deployed a development process, which references a library in the development repository, to production. Amazingly,...
Read more >
Understanding runtime environments - IBM
Read-only runtime libraries that the configuration process does not alter and that are shareable between systems. These libraries physically exist in a full ......
Read more >
What is a Production Environment? - PagerDuty
It's where the developers are writing their code, making code updates, and where all their commits and branches exist. The development environment does...
Read more >
Troubleshoot form issues in model-driven apps - Microsoft Learn
Most of the tools are available in all the production environments. Some of them mentioned in the article might not have been deployed...
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