feathers-vuex icon indicating copy to clipboard operation
feathers-vuex copied to clipboard

FeathersVuexPagination.js: export 'createElement' was not found in '@vue/composition-api

Open romain-aragon opened this issue 3 years ago • 15 comments

Steps to reproduce

Same as fixed : https://github.com/feathersjs-ecosystem/feathers-vuex/pull/505

Fresh Vue 2.0 project with typescript and

"@feathersjs/feathers": "^4.5.11", "@vue/composition-api": "^1.0.0-rc.1",

I have tested without warning using "@vue/composition-api": "^1.0.0-beta.1",

I test also some other beta (2, 10, 26) of composition-api and I have the same warning as 1.0.0-rc-1

romain-aragon avatar Feb 12 '21 09:02 romain-aragon

You can safely ignore the warnings, for context and suppress it if you wish.

J3m5 avatar Feb 12 '21 10:02 J3m5

Thanks @J3m5 I add : https://github.com/markogresak/ignore-not-found-export-webpack-plugin I try to add : const IgnoreNotFoundExportPlugin = require('ignore-not-found-export-plugin')

module.exports = { plugins: [new IgnoreNotFoundExportPlugin({ include: /FeathersVuexPagination/ })], // ... }; in webpack.config.js but I still have the warning Do you know the file where those lines should be added ?

Anyway, for the moment I will just ignore the warning ;-)

romain-aragon avatar Feb 12 '21 11:02 romain-aragon

This message will only go away when either (1) we drop support for the old Composition API plugin (before the breaking changes) or (2) When we finalize the release for Vue 3.

marshallswain avatar Feb 18 '21 16:02 marshallswain

I'm going to mark it as a bug, now, because I'm ready for the issue to disappear. :)

marshallswain avatar Feb 18 '21 16:02 marshallswain

This issue also breaks builds with esbuild and thus vite.

znerol avatar Feb 21 '21 21:02 znerol

@znerol It's not breaking my vite builds. Are you installing the pre-release into your Vite app?

marshallswain avatar Feb 22 '21 04:02 marshallswain

@marshallswain nope, that was just a quick smoke-test on some random code base to see what is working and what is breaking when switching from parcel to vite.

znerol avatar Feb 22 '21 07:02 znerol

So, how would I get this to work on Vue2 with composition-api and use Vite? Vite keeps throwing this error at startup: node_modules/feathers-vuex/dist/FeathersVuexPagination.js:7:2: error: No matching export for import "h"

Thanks!

fontzter avatar Feb 26 '21 21:02 fontzter

We would have to remove the double import/export from the code.  I don't think you'll get it to work any other way.  This will be a breaking

change, so it's a good time to do so.  Nuxt didn't announce anything imminent, so I'll be releasing very soon.

On February 26, 2021, GitHub [email protected] wrote:

So, how would I get this to work on Vue2 with composition-api and use

Vite?  Vite keeps throwing this error at startup:  node_modules/feathers-vuex/dist/FeathersVuexPagination.js:7:2: error: No matching export for import "h"

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/feathersjs-ecosystem/feathers- vuex/issues/574#issuecomment-786904396>, or unsubscribe <https://github.com/notifications/unsubscribe- auth/AAA7OWOVCZGQA24H3DF67OLTBAHIZANCNFSM4XQMZG5A>.

marshallswain avatar Feb 27 '21 02:02 marshallswain

I'm having the same issue trying to get an existing project to work with vite 2. I'm not using nuxt or anything, it's just a project with feathers-vuex...

node_modules/feathers-vuex/dist/FeathersVuexPagination.js:7:2: error: No matching export for import "h"
    7 │   h,
      ╵   ^

error when starting dev server:
Error: Build failed with 1 error:
node_modules/feathers-vuex/dist/FeathersVuexPagination.js:7:2: error: No matching export for import "h"     
    at failureErrorWithLog (F:\vitevue2\node_modules\esbuild\lib\main.js:1160:15)
    at buildResponseToResult (F:\vitevue2\node_modules\esbuild\lib\main.js:896:32)
    at F:\vitevue2\node_modules\esbuild\lib\main.js:991:20
    at F:\vitevue2\node_modules\esbuild\lib\main.js:542:9
    at handleIncomingPacket (F:\vitevue2\node_modules\esbuild\lib\main.js:631:9)
    at Socket.readFromStdout (F:\vitevue2\node_modules\esbuild\lib\main.js:509:7)
    at Socket.emit (events.js:315:20)
    at addChunk (internal/streams/readable.js:309:12)
    at readableAddChunk (internal/streams/readable.js:284:9)
    at Socket.Readable.push (internal/streams/readable.js:223:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
error Command failed with exit code 1.

eslachance avatar Apr 02 '21 12:04 eslachance

So, specifically the problem is, feathers-vuex is requiring @vue/composition-api 0.6.1 which does not have h exported. So I'm maybe a bit confused, why not just update to composition api 1.x and get rid of this error?

eslachance avatar Apr 02 '21 18:04 eslachance

It’s a breaking change and it’s planned for release soon.  I have documentation to update.

On April 2, 2021, GitHub @.***> wrote:

So, specifically the problem is, feathers-vuex is requiring @vue/composition-api 0.6.1 which does not have h exported. So I'm maybe a bit confused, why not just update to composition api 1.x and get rid of this error?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/feathersjs-ecosystem/feathers- vuex/issues/574#issuecomment-812659767>, or unsubscribe <https://github.com/notifications/unsubscribe- auth/AAA7OWOAVKZSGMX3EBY2AHTTGYFTHANCNFSM4XQMZG5A>.

marshallswain avatar Apr 03 '21 03:04 marshallswain

Update on this?

philipimperato avatar May 04 '21 19:05 philipimperato

@marshallswain

It's not breaking my vite builds. Are you installing the pre-release into your Vite app?

Can you pretty please give me composition-api / vite / feathers package versions?

philipimperato avatar May 11 '21 18:05 philipimperato

I opened PR #612 to remove createElement in favor of h and hopefully fix this now that the composition-api is stable

miguelrk avatar Nov 12 '21 09:11 miguelrk