The problem is that there is no dist folder which contains the interface for the methods signatures, β¦
The dist folder should be created when running npm install or am I wrong?
In the plugin dev folder the dist folder exists after running the build and is listed on the .gitignore but I think thatβs ok or should it be comitted to the repo?
I also migrated the rollup.config.js that it looks the same like at the official plugins (excepted the plugin name)
if you want to install from github youβll have to commit the dist folder or add a postinstall script in your plugin that runs npm run build (not 100% sure this will work)
This makes sense, but for example the Capacitor 3 Status-Bar plugin has neither the dist-folder in the repo nor a postinstall script in its package.json
How does it work for this plugin?
You canβt install any of the official plugins from GitHub, not only because of dist not being committed, but because itβs a monorepo and installing from GitHub only works if the package.json is at the root.
We publish the plugins in npm and the publish script runs build command and build folder is in the files object of the package.json so itβs sent to npm.
Makes also sense. I added a postinstall script which simply runs tsc but this already fails because the app is dependant of the plugin and the compiler throws someting like a dependency missing error.
I added it to the plugin. When running tsc directly in the plugin (dev folder) it works properly, when installing it from git/gitlab (node_modules) it doesnβt.
Hey there, did you happen to resolve this? Iβm running into the same issue.
Tried commiting the dist folder but our docker build server still doesnt recognize it
Our build server canβt resolve its type declarations
Did you get this to work?
307: Cannot find module 'capacitor-plugin-crisp' or its corresponding type declarations.
#24 111.0 @xxx/react: Child html-webpack-plugin for "index.html":
@stephannagel solution worked for me.
in package.json add "prepare": "npm run build"
I created plugin for capacitor 3 @capacitor-community/wifi following official docs, but I just wanted to use internally (install from my git repo).
When I install my plugin from remote git these src/definitions.ts, src/index.ts, src/web.ts files were missing from my_project/node_modules/my_capcitor_plugin