Comments (9)
Hi, you are absolutely right. I think the author of this particular theme did a mistake putting those packages in a devDependencies
. I would like to offer the users to use as many of those themes as possible, on the other hand I can't and don't want manage some 250+ 3rd party packages - I guess I will be going to try all the themes one-by-one and blacklist those, with dependency issues I can't fix on my side.
Thank you thought for helping me and explaining how to use the static dependencies with live-plugin-manager
- we might close this issue at this moment. Once again - great work you did here, saving me the necessity of bundling 25MB of NPM with my app.
from live-plugin-manager.
Thanks @karlitos ! I'm closing the issue for now. Probably I need to investigate better why in some circustances (electron?, webpack?) some dependencies are not available (like fs
and path
) but I will probably create a dedicated issue.
from live-plugin-manager.
Yes, I think that it is related to electron or webpack environments, maybe similar to #13 .
Can you try to provide fs
module as a staticDependencies
. You can create LivePluginManager with a code like:
const pluginManager = new PluginManager({
staticDependencies: {
'fs': require('fs')
}
});
Also it is possible to access/debug the host application, where live plugin manager is used. Or a similar environment where I can reproduce the problem.
thanks
from live-plugin-manager.
Dear David, many thanks that solved that issue. 👍 This is great news, because your wonderful project will be a very important part of one of my OSS projects.
from live-plugin-manager.
So, I pushed an updated to the electron-app
branch of my project. With
const pluginManager = new PluginManager({
pluginsPath: localThemesPath,
staticDependencies: {
fs: require('fs'),
path: require('path'),
}
});
I was able to fetch some of the json-resume-themes
and used their render method.
When looking in the directory, where I cache the installed packages, there were no packages fs
or path
. But then later I got Error: Cannot find module lodash and Error: Cannot find module mustache, even though those packages were present in the cache directory. And since my own app does not depend on mustache
, adding it to the staticDependencies breaks the build.
You can check out the electron-app
branch and try to start the electron app to investigate the problem. Just select for example the jsonresume-theme-moon
and then click on process resume, which will install and require the theme and try to create a HTML markup.
from live-plugin-manager.
lodash
and mustache
are dependencies of jsonresume-theme-moon
? Looking here https://raw.githubusercontent.com/adamjmoon/jsonresume-theme-moon/master/package.json they are marked as devDependencies
but live-plugin-manager doesn't install development dependencies, so maybe they are not installed. Can you try to put it in dependencies
instead? Also put every other required modules in dependencies...
from live-plugin-manager.
I know this issue is closed. However, I can confirm I had the same issue with my webpacked package. I do wonder if it is a webpack issue or maybe a vm issue.
from live-plugin-manager.
Also, I think it might be useful to maybe put some of this info into the Readme since it was a head scratcher for me until I was luckily able to find this thread. Thank you so much for the awesome project!
from live-plugin-manager.
@NateAGeek Are you running inside electron? See #13
Can you describe your environment and version?
from live-plugin-manager.
Related Issues (20)
- 'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead. HOT 3
- 0.14.1 -> 0.15.1 issue on 0.15.1 HOT 2
- no such file or directory, mkdir '/plugin_packages' HOT 4
- getInfo should load the package from disk HOT 2
- Proxy settings for NPM registry HOT 1
- Support loading plugins without FS access HOT 1
- fix: circular dependencies result in endless loop + out of memory crash HOT 3
- Plugin manager require gives module not found but passing the path directly works HOT 4
- Plugin manager gives an error requiring aws-sdk HOT 3
- sharp lib install failed HOT 2
- Error when using require to load an ES6 module HOT 7
- PluginManager.install is not compatible with NodeJS workers HOT 1
- Literal Object prototype is not working properly inside the plugin's context HOT 9
- Module not found: Can't resolve 'console' in React HOT 2
- Error: Invalid plugin github repository HOT 2
- Improper Error handling HOT 1
- PluginVm.getScopedInfo could not get the correct scope if it contains a dot HOT 1
- Handling modules with index.json entrypoints HOT 2
- FR: Support for `"exports"` in `package.json` HOT 1
- Error: Code generation from strings disallowed for this context HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from live-plugin-manager.