程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了尝试启动 WebAssembly + Vite + Vue 的开发服务器时,“您可能没有权限”大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决尝试启动 WebAssembly + Vite + Vue 的开发服务器时,“您可能没有权限”?

开发过程中遇到尝试启动 WebAssembly + Vite + Vue 的开发服务器时,“您可能没有权限”的问题如何解决?下面主要结合日常开发的经验,给出你关于尝试启动 WebAssembly + Vite + Vue 的开发服务器时,“您可能没有权限”的解决方法建议,希望对你解决尝试启动 WebAssembly + Vite + Vue 的开发服务器时,“您可能没有权限”有所启发或帮助;

当我运行 yarn dev 时,我得到以下输出:

yarn run v1.22.10
warning package.Json: No license fIEld
$ vite

???????????????????
⚡️⚡️         Hello RSW!           ⚡️⚡️
⚡️⚡️  Vite + Rust ? WebAssembly  ⚡️⚡️
???????????????????
vite-plugin-rsw (1.8.0)
[rsw::deploy] https://github.com/lencx/rsw-node

[rsw::optimized] wasm-pack build wasm.

up to date,audited 241 packages in 3s

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

4 moderate severity vulnerabilitIEs

To address all issues,run:
  npm audit fix

Run `npm audit` for details.
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../../../home/isaachmi/projects/my-blackspace/wasm/pkg
npm ERR! dest /usr/lib/node_modules/wasm
npm ERR! errno -13
npm ERR! Error: EACCES: permission denIEd,symlink '../../../home/isaachmi/projects/my-blackspace/wasm/pkg' -> '/usr/lib/node_modules/wasm'
npm ERR!  [Error: EACCES: permission denIEd,symlink '../../../home/isaachmi/projects/my-blackspace/wasm/pkg' -> '/usr/lib/node_modules/wasm'] {
npm ERR!   errno: -13,npm ERR!   code: 'EACCES',npm ERR!   syscall: 'symlink',npm ERR!   path: '../../../home/isaachmi/projects/my-blackspace/wasm/pkg',npm ERR!   dest: '/usr/lib/node_modules/wasm'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operaTing system.
npm ERR! it is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you belIEve this might be a permissions issue,please double-check the
npm ERR! permissions of the file and its containing directorIEs,or try running
npm ERR! the command again as root/administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/isaachmi/.npm/_logs/2021-07-21T14_44_01_966Z-deBUG.log

[rsw::npm::link]
  ↳ wasm   /home/isaachmi/projects/my-blackspace/wasm/pkg 

error when starTing dev server:
Error: The following dependencIEs are imported but Could not be resolved:

  wasm (imported by /home/isaachmi/projects/my-blackspace/src/components/HelloWorld.vuE)

Are they installed?
    at optimizeDeps (/home/isaachmi/projects/my-blackspace/node_modules/vite/dist/node/chunks/dep-f2b4ca46.Js:73091:15)
    at runMicrotasks (<anonymous>)
    at processticksAndRejections (node:internal/process/task_queues:96:5)
    at async runoptimize (/home/isaachmi/projects/my-blackspace/node_modules/vite/dist/node/chunks/dep-f2b4ca46.Js:73765:48)
    at async Server.httpServer.Listen (/home/isaachmi/projects/my-blackspace/node_modules/vite/dist/node/chunks/dep-f2b4ca46.Js:73779:17)
error Command Failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

我的 WebAssembly 包名为 wasm,这是我的 vite 配置:

import { defineConfig } from "vite";
import vue from "@viteJs/plugin-vue";
import ViteRsw from "vite-plugin-rsw";

// https://viteJs.dev/config/
export default defineConfig({
  plugins: [
    vue(),ViteRsw({
      crates: ["wasm"],}),],});

我正在使用 plugin for vite 来使用 Rust 和 WebAssembly。我遵循了他们在 Vue3 中使用的示例,但使用了我的包。我做错了什么吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的尝试启动 WebAssembly + Vite + Vue 的开发服务器时,“您可能没有权限”全部内容,希望文章能够帮你解决尝试启动 WebAssembly + Vite + Vue 的开发服务器时,“您可能没有权限”所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。