import video.js into nuxt.js application not working - vue.js

I'm trying to use video.js in a Nuxt app. I ran yarn add video.js, which installed video.js and I can see it in package.json
In my page video.vue I added
import videojs from 'video.js'
vscode returns this error:
Could not find a declaration file for module 'video.js'. '../node_modules/video.js/dist/video.cjs.js' implicitly has an 'any' type.
Try npm i --save-dev #types/video.js if it exists or add a new declaration (.d.ts) file containing declare module 'video.js';
I followed the example on the official page for vue: https://videojs.com/guides/vue/

Related

Adding Amplitude to store module in Vue app with Nuxt

I have a Vue app with with Nuxt and I am instrumenting it with Amplitude. I have already installed nuxt-amplitude via npm and actually I can log in .vue modules using
this.$amplitude.getInstance().logEvent('event')
But now I want to log from a .js file in a vue store module but it doesnt work. Any idea?
I tried using
this.$amplitude.getInstance().logEvent('event')
this.$nuxt.$amplitude.getInstance().logEvent('event')
amplitude.getInstance().logEvent('event')

Error while importing local native module package

I'm new to React Native as such i need some help with a rather interesting problem. I'm trying to create a native module library to wrap some native ios/android api's. I followed some examples on the react site to do this but the issue i'm running into is how to package my created module so i can import the code into another react native app.
This is the error i'm running into while trying to use my newly created module.
TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[7], "simple").DeviceModule.increment')
I create the package via npm pack, it generates a .tgz file which i attempt to install into my sample app via npm install but the end result is the error message above.
When attempting to use the module in my code i use the following: import { DeviceModule } from 'simple'; and this generates a warning:
Could not find a declaration file for module 'simple'. '/Users/aqureshi/Projects/React/ScanForensicsDemo/node_modules/simple/index.js' implicitly has an 'any' type. Try npm i --save-dev #types/simple if it exists or add a new declaration (.d.ts) file containing declare module 'simple';ts(7016)
So i'm not sure where to go from here, also worth mentioning that I created the native module via another RN "App" project, because when i try to create a library via create-react-native-library it would not work either.

Unable to create a vue-web-extension from vue-cli

Currently, I am modifying a chrome extension I have built to adding a popup page that is developed in Vue. I am using this tutorial, https://www.streaver.com/blog/posts/create-web-extension-vue.html.
Whenever I try the step vue init kocal/vue-web-extension my-extension, I get the following error:
vue-cli · ENOENT: no such file or directory, scandir '/Users/avidave/.vue-templates/kocal-vue-web-extension/template'
I have updated my vue-cli to the latest version so I am not sure what this really means. I know the file template doesn't exist, but I am not sure what is the right way to create the file in the kocal-vue-web-extension, or if it is needed for that matter.
Try This
vue create --preset kocal/vue-web-extension my-extension

quasar display text/markdown from assets or statics folder

I'm trying to read the content of a markdown file (.md) stored in statics or assets folder of my quasar project and I have updated the quasar.conf.js file with the following change to support raw file loading after adding raw-loader to my project
extendWebpack(cfg) {
cfg.module.rules.push({
test: /\.md$/i,
use: "raw-loader"
});
I'm trying to load the markdown, using import command from one of the .vue component script tag as below
import md from "~statics/help.md";
But when I run the project, it compiles to 100% and throws the below error
• Compiling:
└── SPA ████████████████████ 100% done in ~13s
ERROR Failed to compile with 1 errors 8:22:43 AM
This dependency was not found:
* ~statics/help.md in ./node_modules/babel-loader/lib??ref--1-0!./node_modules/#quasar/app/lib/webpack/loader.auto-import.js?kebab!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/Help.vue?vue&type=script&lang=js&
To install it, you can run: npm install --save ~statics/help.md
let me know if any solution
Its seems like quasar can't find the proper reference since I don't know your exact folder structure
Try using ../static/{filname} and see if it works

Im getting a error about in a manifest json i cant locate when serving my vue project

So this is the error i get when i open my vue project... except that i cant even locate my manifest.json nore do i have a /img/icons folder in the project. I cannot figure out what the error is or how to correct it
Error while trying to use the following icon from the Manifest: http://localhost:8080/img/icons/android->chrome-192x192.png (Download error or resource isn't a valid image)
The error you're seeing is typically caused by altering a project created using Vue Cli 3's command vue create some-project and then removing either parts of or in its entirety the public folder. Namely, the error complains about the absence of icon files situated in public/img/icons, aimed at providing android, apple or web icons/favicons for the served/built app.
A possible fix for this error is to create a new project (run vue create whatever outside of your project) and copy-paste the resulting public/ folder into your current project.
If you haven't created your project with Vue Cli 3, the solution above will likely not work.
For Vue Cli 2.x projects, according to Vue Cli docs running vue init webpack my-project in the root of the project (where my-project is the name of your project as set in package.json) might work.