I am developing multiple websites in angular with similar content and have therefore decided to extract common components and functionality into a separate angular 14 library.
I have previously successfully used the JSZip library in one of these websites with Angular 12, but have then decided to move this implementation into the library.
Even though the code did not change, it stopped working.
If I try to call the method that uses JSZip from the library it now throws the following TypeError
ERROR TypeError: (jszip__WEBPACK_IMPORTED_MODULE_1___namespace_cache || jszip__WEBPACK_IMPORTED_MODULE_1___namespace_cache) is not a constructor
Import library like this
import * as JSZip from 'jszip';
create a new JSZip instance like this
const zip = new JSZip();
Both the library and the website projects build correctly but throw this error at runtime, so I don't think it is a problem with dependencies.
Has someone encountered a similar problem before? What should I try to solve this?
Both the library and the website projects build correctly but throw this error at runtime, so I don't think it is a problem with dependencies.
Has someone encountered a similar problem before? What should I try to solve this?
I saw similar post like this
Related
to sum up my circumstances:
I am running everything locally
I am using flask in the backend within a virtual environment
Goal: build a socket connection between Flask Backend and JS Frontend
PROBLEM: the problem is in the Frontend which is based on JS where I can't import the modules I got with npm
I am importing the modules as follows:
import { io } from "socket.io-client"
import { Hands } from "/#mediapipe/hands"
I also tried different import variants such as import * as io from "socket.io-client" and I also tried importing directly files as follows: import {io} from "socket.io-client/dist/socket.io", but all without success as these lead to "not found" errors.
I am sure that I installed them correctly with npm as I can see them in the folder structure, but the es6 imports are throwing an error as follows:
Failed to resolve module specifier "socket.io-client". Relative references must start with either "/", "./", or "../" - To solve this I tried adding slashes to different places like in the html tag where I include the script I tried transforming "type="module"" to "type="/module"" as recommended somewhere online, but without success. Also building direct references in the imports like "./node_modules/socket.io-client" do not work as it states that the file/folder is not found.
The problem must be the usage of the imports as everything works when I use Content Delivery Networks which also lets me assume that the version of the packages is not the problem as the version I get from the CDN is the same, but still the versions I use:
socket.io-client: 4.6.0
#mediapipe/hands: 0.4.1675469240
Flask: 2.2.3
Flask-SocketIO: 5.3.2
npm: 8.19.3
node: 16.19.1
My folder structure is as follows:
venv
main.py
templates
index.html
static
node_modules (includes socket.io-client and #mediapipe/hands)
js
main.js (the js file where the problem occurs)
package.json
I read a few times that the usage of "Webpack" is recommended, but I would like to skip that currently as I am not very familiar with that, so one question would also be: is it necessary to use it?
What can I possibly do wrong or how can I track my problem when it is about the import of es6 modules?
I would appreciate any help. Thanks in advance!
I could solve my problem for the socket.io-client package:
For the socket.io-client I imported a specific file directly although I do not really know why it worked as follows:
import { io } from './node_modules/socket.io-client/dist/socket.io.esm.min.js'
For the mediapipe package I still could not import the module in my js file directly and I am still relying on CDN. I tried the same thing in the same way by using:
import * as Hands from './node_modules/#mediapipe/hands/hands.js'
This, at least, does not result in an error, but the usage of "Hands" in this case is unclear to me as there is also no documentation for this use case in the mediapipe-js documentation. I could not directly import the {Hands} function as it resulted in an error saying "there is no function Hands in that path"
I am trying to create a library of fftool so that the uwp app doesn't have to launch a process to run FFmpeg exe out of the environment and yet able to run all command of fftool. so, for that
first, I created a static lib compiling fftool c code adding all the necessary linking and include
then I created a WinRT component in c++ to connect this library to my uwp app
so, again provided all the input, link, include and then added a reference to the static library to it.
since both of them are in the same solution.
so, I did not add a reference to the linker and include for the static library in the WinRT component
then for the test, I created a class calling a simple function that I added to c manually
but now whenever I try to create an object of that test class it throws an error saying
-The specified module could not be found. (Exception from HRESULT: 0x8007007E)
and this is all at runtime
while compiling and launching of the app in c# work fine.
but if I use the c++ app it crashes as it launches
and also I am new to c and c++ I didn't use the c/c++ before that so I am stuck at it and unable to understand what's wrong and I tried googling it but I am unable to find something
thanks
ok so it looks like my app is unable to find FFmpeg core dll as avcodec, avfilter, etc so now I added them to exe location and it worked ok
I'm struggling to implement AppsFlyer on Android using Java.
I have looked into a couple of posts already such as this, this.
Here is the entire error message: [org.gradle.api.Project] AGPBI: {"kind":"error","text":"Program type already present: com.appsflyer.AFExecutor","sources":[{}],"tool":"D8"}
The version
AppsFlyer SDK: 5.+
Android Studio: 3.5.2
Situation
I have done till 4.1 of this guide so far so good.
On AndroidManifest.xml, the main class name of AF has implemented with android.name attribute.
On AndroidManifest.xml, receiver tag commented out (because in this phase I don't believe I do not need a precise data tracking feature.)
What I have tried.
./gradlew app:dependencies | less To find out AFExecutor in other dependencies
To exclude the program
implementation ('com.appsflyer:af-android-sdk:5.+'){
exclude module: 'com.appsflyer'
}
implementation ('com.appsflyer:af-android-sdk:5.+'){
exclude module: 'AFExecutor'
}
If you have any insights, I'd love to hear that.
Try ./gradlew clean, clean project and invalidate caches and restart. If does not help than delete all build and .idea folders, .iml files.
After exploring a bunch of dependencies, I found the solution. The reason was there was a conflict between com.appsflyer:af-android-sdk:5.+ and AF-Android-SDK.jar which had installed manually. After removing the JAR file and built again, I could make it at last! Thank you so much for sharing your experiences, however, the solution was simple!
I am trying to deploy an application to a target machine and am getting a side-by-side configuration error. I traced it and found that the application is trying to reference AxisMediaControl.X.dll instead of AxisMediaControl.dll. I recently converted to a new version of Embarcadero (10 Seattle) and assume I've missed something in my config. Let me know how I can remove this extra X in the filename in the reference path.
Thanks!
I forgot on this project I created a custom manifest file....I must include that manifest file with the deployment. It's always tough coming back from Christmas break. Problem solved.
I'm trying to write unit tests using miniDFSCluster and it's throwing the error below
java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
any pointers to resolve this issue?
With errors like this, I use three steps
Find out what it is looking for
In this case, *org.apache.hadoop.io.nativeio.NativeIO$Windows.access0*
Find out what jar/lib it is in.
I don't use the Windows version, but I believe it is in hadoop.dll -
you'll have to check this.
Find out where I'm telling it to use that jar/lib
Update: See also this Answer.
I was able to resolve this error by following these steps:
Download hadoop.dll and winutils.exe in the same version that I'm using in the sbt/maven configuration, you can find these files in all versions of hadoop here: link
Put these 2 files in your %hadoop directory%\bin folder
make sure that %hadoop directory%\bin is listed under PATH in your device's environmental path(if using windows)
then the code should work just fine.