Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vue example #106

Merged
merged 8 commits into from
Aug 6, 2024
Merged

Add Vue example #106

merged 8 commits into from
Aug 6, 2024

Conversation

mipo1357
Copy link
Collaborator

Added example of using mupdf from vue through worker.

I have a vite config set up to copy the necessary files from the mupdf library. Those files are referenced from the worker.

Copy link
Collaborator

@jamie-lemon jamie-lemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever stuff- generally works great and I like the way you embed the worker to get it working with Vue.

One thing, when I first ran I got this problem:

jamielemon@Jamie-Lemon-MBP vue % npm install

added 204 packages, and audited 205 packages in 8s

46 packages are looking for funding
  run `npm fund` for details

3 moderate severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
npm notice 
npm notice New minor version of npm available! 10.1.0 -> 10.8.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2
npm notice Run npm install -g [email protected] to update!
npm notice 
jamielemon@Jamie-Lemon-MBP vue % npm run dev

> [email protected] dev
> vite

/Users/jamielemon/Desktop/freelance/artifex/SDK/mupdfjs/mupdf.js/examples/vue/node_modules/rollup/dist/native.js:59
		throw new Error(
		      ^

Error: Cannot find module @rollup/rollup-darwin-x64. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.

After I deleted package-lock.json and node_modules and it worked. Can we do the following with another commit:

  1. Remove package-lock file
  2. Add instructions to the README to do npm i before doing npm run dev ( I know most developers know this already, but I like to have it in the README just in case )

@jamie-lemon jamie-lemon merged commit 5530931 into master Aug 6, 2024
1 check passed
@jamie-lemon jamie-lemon deleted the vue-example branch August 6, 2024 14:41
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants