facebook / flipper

A desktop debugging platform for mobile developers.
https://fbflipper.com/
MIT License
13.31k stars 954 forks source link

createTablePlugin is not a function #2611

Open Dkhusainov opened 3 years ago

Dkhusainov commented 3 years ago

🐛 Bug Report

Plugin query failed to load TypeError: (0 , _flipper.createTablePlugin) is not a function
    at C:\Users\mole\.flipper\installed-plugins\flipper-plugin-query\1.0.0\dist\bundle.js:789:49

    at loadModuleImplementation (C:\Users\mole\.flipper\installed-plugins\flipper-plugin-query\1.0.0\dist\bundle.js:286:7)

    at guardedLoadModule (C:\Users\mole\.flipper\installed-plugins\flipper-plugin-query\1.0.0\dist\bundle.js:166:14)

    at metroRequire (C:\Users\mole\.flipper\installed-plugins\flipper-plugin-query\1.0.0\dist\bundle.js:93:75)

    at Object.<anonymous> (C:\Users\mole\.flipper\installed-plugins\flipper-plugin-query\1.0.0\dist\bundle.js:799:25)

    at Object.<anonymous> (C:\Users\mole\.flipper\installed-plugins\flipper-plugin-query\1.0.0\dist\bundle.js:801:3)

    at Module._compile (internal/modules/cjs/loader.js:1152:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)

    at Module.load (internal/modules/cjs/loader.js:992:32)

    at Module._load (internal/modules/cjs/loader.js:885:14)

    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)

    at Module.require (internal/modules/cjs/loader.js:1032:19)

    at require (internal/modules/cjs/helpers.js:72:18)

    at requirePluginInternal (file:///Z:/flipper/resources/app.asar/bundle.js:3823:5690)

    at file:///Z:/flipper/resources/app.asar/bundle.js:3823:5529

    at tryCatchReportPluginFailures (file:///Z:/flipper/resources/app.asar/bundle.js:3688:1493)

To Reproduce

  1. Use flipper-pkg init to bootstrap the plugin
  2. Delete flipper-plugin from package.json
  3. Create an empty table plugin as described in https://fbflipper.com/docs/extending/create-table-plugin/

Environment

Flipper: 0.98.0

mweststrate commented 3 years ago

Hey @Dkhusainov, apologies for the inconvenience! The page you're linking to is deprecated, but the up to date tutorial is here: https://fbflipper.com/docs/tutorial/js-table, with the full options documented here:

https://fbflipper.com/docs/extending/flipper-plugin#createtableplugin. Note that imports come from flipper-plugin, not flipper in the updated tutorials / APIs.

Dkhusainov commented 3 years ago

Reverting to 0.94.1 version fixed the problem form me without doing anything else. Old implementation of table plugin not working on latest version of Flipper is an intended change?

mweststrate commented 3 years ago

Correct, we deprecated the API a few months ago and there didn't seem to be any public users at that moment.

On Thu, Jul 22, 2021 at 9:17 AM Dkhusainov @.***> wrote:

Reverting to 0.94.1 version fixed the problem form me without doing anything else. Old implementation of table plugin not working on latest version of Flipper is an intended change?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/facebook/flipper/issues/2611#issuecomment-884734803, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBDOEXZZ4TO3QNEXVV3TY7HYJANCNFSM5AZHTB4A .

dallasgutauckis commented 3 years ago

We were using createTablePlugin internally (can't publish a plugin for external use that is internally use case specific). I'm looking at trying to upgrade to this new plugin architecture, but the docs are really confusing at this point.

This page (in Deprecated APIs) notes,

The following mechanism isn't supported yet by the Sandy plugin architecture. Please remove flipper-plugin from the plugin dependencies if you want to use createTablePlugin.

While the main tutorial mentions the same API:

import {DataTableColumn, createTablePlugin} from 'flipper-plugin';

I realize these are importing from different dependencies, but--and I'll admit I'm a newbie to React/JSX stuff--it seems like neither works as expected, whether I add or remove flipper-plugin from peerDependencies as mentioned in Migrating a plugin to Sandy


  1. I wanted to note that we internally were using this API
  2. I am now wondering how to implement a table, especially given none of the Table stuff is documented, assuming the current tutorial is just wrong and I'm not just misconfigured
mweststrate commented 3 years ago

Create table plugin has been updated and can be found here: https://fbflipper.com/docs/extending/flipper-plugin/#createtableplugin

stale[bot] commented 2 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.