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.

Tons of errors for me

See original GitHub issue

I’m at esnext, "typescript": "^3.9.2", "ts-loader": "^7.0.4" - let me know if you need anything else.

WARNING in ./node_modules/live-plugin-manager/src/PluginManager.js 42:17-24
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
 @ ./node_modules/live-plugin-manager/index.js
 @ ./src/index.tsx

WARNING in ./node_modules/live-plugin-manager/src/PluginVm.js 245:19-40
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/live-plugin-manager/src/PluginManager.js
 @ ./node_modules/live-plugin-manager/index.js
 @ ./src/index.tsx

WARNING in ./node_modules/live-plugin-manager/src/PluginVm.js 257:15-44
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/live-plugin-manager/src/PluginManager.js
 @ ./node_modules/live-plugin-manager/index.js
 @ ./src/index.tsx

ERROR in ./node_modules/fs-extra/lib/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/jordanzimmerman/dev/oss/journalator/journalator-main/node_modules/fs-extra/lib'
 @ ./node_modules/fs-extra/lib/index.js 22:11-24
 @ ./node_modules/live-plugin-manager/src/fileSystem.js
 @ ./node_modules/live-plugin-manager/src/PluginManager.js
 @ ./node_modules/live-plugin-manager/index.js
 @ ./src/index.tsx

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Randgaltcommented, May 16, 2020

Do you need types for these libraries?

Probably not. tbh I’m very new to the Javascript world and am just learning everything. Your plugin manager is fantastic and just what I was looking for but finding the right framework for integrating it has been an issue for me. Frankly the loaders and dev environment are not what I want. I will switch to express and managing things myself along with your plugin manager. That will remove any of these incompatibilities - I’ll just get webpack, ts-loader and babel out of the way and rely on pure Javascript for plugins. I can still write my own code in Typescript with tsc.

1reaction
davideicardicommented, May 16, 2020

The following configurations works fine:

package.json

{
  "name": "test-lpm",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "devDependencies": {
    "@types/node": "^13.13.2",
    "typescript": "^3.8.3"
  },
  "dependencies": {
    "live-plugin-manager": "^0.14.1"
  },
  "scripts": {
    "build": "tsc"
  },
  "author": "",
  "license": "ISC"
}

tsconfig.json

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "commonjs",
    "strict": true,
    "esModuleInterop": true,
  }
}

index.ts

import {PluginManager} from "live-plugin-manager";
const p = new PluginManager();
p.install('moment')

I have tried with your dependencies and I have the same errors. I suspect that there is some incompatible library. I will try to investigate further…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Messages: Examples, Best Practices & Common Mistakes
Useful error messages can keep users on your site and increase conversions. See examples and learn the best practices.
Read more >
Tired of Error Messages? You Shouldn't Be — And Here's Why
Lot's of error messages have tons of boilerplate details that aren't important to the actual error. You want to find that part in...
Read more >
npm i react-router-dom gives me tons of errors - Stack Overflow
When i install the package any version of react router it gives me an error. I tried to uninstall them and npm audit...
Read more >
Fix program errors and improve code - Visual Studio (Windows)
This article describes some basic ways Visual Studio can help you find and fix problems in your code, including build errors, code analysis, ......
Read more >
Why did only 16 lines of code gave me tonnes of errors?
Why did only 16 lines of code gave me tonnes of errors? Idk what is going on. https://code.sololearn.com/c3QWRB1ZY0la/?ref=app · c++error.
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