Question: ReferenceError when bundling plugin with flipper-pkg
See original GitHub issueHi, I am trying to publish my plugin but when I execute flipper-pkg bundle
in a folder with a plugin, following error occurs
ReferenceError: SHA-1 for file /home/maksim/IdeaProjects/flipper-plugin/desktop/plugins/adb-plugin/src/index.tsx (/home/maksim/IdeaProjects/flipper-plugin/desktop/plugins/adb-plugin/src/index.tsx) is not computed at DependencyGraph.getSha1 (/home/linuxbrew/.linuxbrew/lib/node_modules/flipper-pkg/node_modules/metro/src/node-haste/DependencyGraph.js:338:13) at /home/linuxbrew/.linuxbrew/lib/node_modules/flipper-pkg/node_modules/metro/src/DeltaBundler/Transformer.js:254:26 at Generator.next (<anonymous>) at asyncGeneratorStep (/home/linuxbrew/.linuxbrew/lib/node_modules/flipper-pkg/node_modules/metro/src/DeltaBundler/Transformer.js:68:24) at _next (/home/linuxbrew/.linuxbrew/lib/node_modules/flipper-pkg/node_modules/metro/src/DeltaBundler/Transformer.js:90:9) at /home/linuxbrew/.linuxbrew/lib/node_modules/flipper-pkg/node_modules/metro/src/DeltaBundler/Transformer.js:97:7 at new Promise (<anonymous>) at /home/linuxbrew/.linuxbrew/lib/node_modules/flipper-pkg/node_modules/metro/src/DeltaBundler/Transformer.js:86:12 at Transformer.transformFile (/home/linuxbrew/.linuxbrew/lib/node_modules/flipper-pkg/node_modules/metro/src/DeltaBundler/Transformer.js:283:7) at /home/linuxbrew/.linuxbrew/lib/node_modules/flipper-pkg/node_modules/metro/src/Bundler.js:95:34 🥵 Build failed
flipper-pkg version:
flipper-pkg -v
flipper-pkg/0.52.1 linux-x64 node-v14.1.0
npm version:
npm --version
6.14.7
package.json for a plugin can be found here: https://github.com/maxim-pandra/adb-flipper-plugin/blob/adb-plugin/desktop/plugins/adb-plugin/package.json
Please advise what should I do, I updated npm with npm install -g npm@latest
and reinstalled flipper-pkg
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Hi @maxim-pandra! I’ve cloned your repo, and also got an error on
flipper-pkg bundle
. However it is a bit different on MacOS. I suspect that this issue only happens with globally installed “flipper-pkg”. Could you try to invokeyarn flipper-pkg bundle
instead offlipper-pkg bundle
? It will use “flipper-pkg” from the repo (located in /desktop/pkg/) instead of globally installed. On my machine this command succeeded.What might go wrong here is that the flipper checkout is not the normal place to develop a plugin (although it can be convenient), so
flipper-pkg
might not support that case (@nikoant ) might now better. Typically, a plugin is developed somewhere in a local folder, not directly in the Flipper repo, so that you can manage it in your own git repo, etc. See: https://fbflipper.com/docs/extending/js-setup#workflow