How can I resolve vis_network__WEBPACK_IMPORTED_MODULE_2__.DataSet is not a constructor in cjs module? - vis.js

I've built an internal package on top of vis.js that packages itself as both cjs and mjs. The package runs fine on its own. However, when I import and attempt to use it I get a vis_network__WEBPACK_IMPORTED_MODULE_2__.DataSet error.
I've tried importing DataSet from various subdirs of vis-network and vis-data. But, I haven't had any luck. What else can I try?

Figured it out. All I had to do was install vis-data separately as opposed to relying on the package installed with vis-network.

Related

Julia fails to precompile packages ExcelFiles, Plots and JuMP

I am a beginner with using Julia and I am trying to use the packages. However, when I try to use the packagegs Excelfiles, plots and JuMP. I use this code for the packages:
Pkg.add("JuMP")
using JuMP
I get the error: ERROR: Failed to precompile JuMP [4076af6c-e467-56ae-b986-b466b2749572] to C:\Users\yobbi.julia\compiled\v1.7\JuMP\jl_39BC.tmp. I already updated the packages, restarted my laptop, and downloaded Julia again but I keep getting this error. Can someone help me out? Thanks!
Try:
using Pkg
pkg"build JuMP"
This will either resolve your problem or show you errors in the package build process.
Please also note that "reinstalling" Julia usually not helps as Julia is keeping its files in the .julia folder.
Finally, your folder C:\Users\yobbi.julia looks fishy to me. Maybe it is a typo and it should be C:\Users\yobbi\.julia or you managed to misconfigure something with the JULIA_DEPOT_PATH variable.

Reticulate package, cannot install Python packages using py_install()

I am following the instructions here to install packages (I'm looking at the "Simple Installation") section: https://rstudio.github.io/reticulate/articles/python_packages.html
Here is my R code:
library(reticulate)
use_python(python="C:\\Users\\...\\AppData\\Local\\Programs\\Python\\Python39\\python.exe")
py_install("pandas")
However, I'm getting the following error:
Error: could not find a Python environment for
C:/Users/.../AppData/Local/Programs/Python/Python39/python.exe
How do I resolve this? I have used py_install() this way on another computer before, so I know it's possible and I would like to use it. However, I can't understand what I'm missing.
You might respond that I need to specify an environment when using py_install(), but the instructions in the link don't require that, and I know it can be done without specifying an environment every time. Do I need to somehow set a "default"?
EDIT: Just to clarify, I am on Windows.
You may not be connected to the proper environment. Depending on your OS, you will likely have to create a .Renviron file and direct R to look for it.
This post here, should help you diagnose the issue:
Unable to change Python path in reticulate

URL '/help/library/<package>/r/html/00Index.html' not found when using `devtools::load_all()`

I am using devtools::load_all as a workflow to iteratively make a package. However, I cannot seem to be able to view the package documentation using ? or help(package=package_name) until I install the package. The error I get is:
No documentation for ‘function’ in specified packages and libraries
and
URL '/help/library//r/html/00Index.html'
any suggestions on how to resolve this?
Thanks!
I guess the help(package=package_name) do nothing than open (in case of Windows) this file for you:
C:\Users\YourName\Documents\R\win-library\4.1\package_name\html\00Index.html
devtools::load_all make your latest functions available to you for testing without installing the package (i.e. the html file was not updated, and masked because it was belonged to the old version of your own package). To view your latest documentation (i.e. make a new version html), you can devtools::document() and check your package working directory \man\Functions_name.rd, OR, devtools::install() and help(package=package_name)
Just restarting r session solved my problem.

Julia: How to deal with ERROR: Unsatisfiable requirements detected for package?

When I install packages, I sometimes encounter this error. What is the issue and how to resolve it?
Learn how to use the ]activate command.
Just create a new directory somewhere, e.g. c:/a_new_directory then activate
]activate c:/a_new_directory
Once activated, you can install whatever packages you need since it's a fresh environment.
Every time you want to use the same set of packages together, just activate that directory.
Try not to install everything using add try to do activate before add.

App not loading dependency properly from another package

I'm playing a bit with Meteor and got stuck with a problem here. I'm using Meteor 1.2 btw.
I'm implementing a cardgame, so as I read over the interwebs as a good practice, I started separating my app features in packages.
I did an app-lib package to wire my dependencies. That package is then required by other packages in the app, so in the case that I have to update some package's version, it updates for all the packages that use it at once.
In this app-lib package I api.imply() the dependencies that I want to expose, to the other packages that use it. Right now, I have just one other package that is a board package that api.use() the api-lib, but I'm getting the following error on app startup:
"Object [object Object] has no method 'helpers'"
This error goes for a Collection and has to do with the dburles:collection-helpers package I think.
The things I tried to solve the problem:
Check that app-lib has dburles:collection-helpers on the api.imply()
Include dburles:collection-helpers in the main app
Include dburles:collection-helpers in the 'board' package
The problem persists. It's important to notice that before I extracted the packages, all the dependencies were in the main app and everything worked fine.
I think maybe the problem has to with some load order stuff that I'm not familiar with.
Any guesses?
try remove the package and install it again? As far i know meteor sets the

Resources