Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 231627

Capacitor plugin development: This dependency was not found

$
0
0

I am developing a Capacitor plugin (local) for personal use and followed these steps:

  1. Generated a plugin via npm init @capacitor/plugin [options] etc. (this worked fine)
  2. npm install --save …/pathtomyplugin (local path)
  3. npx cap sync

So far so good …
Package sits in the package.json (“capacitor-plugin-unlocks”: “file:…/capacitor-plugin-unlocks”,)
But when I try to build my ionic android project with:
ionic capacitor sync android / or ionic build

I get this:
This dependency was not found:

  • capacitor-plugin-unlocks in ./node_modules/cache-loader/dist/cjs.js??ref–12-0!./

My plugin is still in development and is not published on NPM.
How do I get this to work? (I am working within an ionic vuejs project)

*update:
I discovered that the folder in ./node-modules is only a link/shortcut to the other path … it does not actually copy the files over. I tried npm link as well but without success.
Manually copying the plugin into node modules does not help either


Viewing all articles
Browse latest Browse all 231627

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>