Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: Can't resolve '#build/orm-options' on Nuxt 2 without Nuxt-Bridge #628

Closed
mackwic opened this issue Nov 25, 2022 · 4 comments
Closed
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@mackwic
Copy link

mackwic commented Nov 25, 2022

Environment

Versions:

  • Nuxt: nuxt@2.15.8
  • Vue: vue@2.7.14
  • Pinia-orm:
    • @pinia-orm/nuxt@1.1.4
    • pinia-orm@1.2.2

Reproduction

Eeeer, sorry I've tried but I'm not fluent enough for that. 😅 I'm happy to add you as a contributor to my (private) project if that helps.

Describe the bug

nuxt dev failed to build. The file @pinia-orm/nuxt/dist/runtime/nuxt2-plugin.mjs is looking for the package #build/orm-options which does not exists.

I really don't know how to help more, sorry. :/

In the browser:
CleanShot 2022-11-25 at 15 06 21@2x

Additional context

Logs

✖ Client
  Compiled with some errors in 153.82ms


 ERROR  Failed to compile with 1 errors                                    friendly-errors 14:42:55

This dependency was not found:                                             friendly-errors 14:42:55
                                                                           friendly-errors 14:42:55
* #build/orm-options in ./node_modules/@pinia-orm/nuxt/dist/runtime/nuxt2-plugin.mjs
                                                                           friendly-errors 14:42:55
To install it, you can run: npm install --save #build/orm-options          friendly-errors 14:42:55
@mackwic
Copy link
Author

mackwic commented Nov 25, 2022

Is Nuxt Bridge a requirement? I've not installed it. I'll try and update this comment with the outcome...

UPDATE: yes, it seems that Nuxt Bridge is a requirement for Pinia-ORM as it uses NuxtKit. It seems that NuxtKit won't do the module install and file generation without Nuxt-Bridge.
As Nuxt-Bridge is not a requirement for Pinia itself, I skipped that part.

I think the install doc should be updated to reflect that.

@mackwic mackwic changed the title Build error: Can't resolve '#build/orm-options' on Nuxt 2 Build error: Can't resolve '#build/orm-options' on Nuxt 2 without Nuxt-Bridge Nov 25, 2022
@CodeDredd CodeDredd added documentation Improvements or additions to documentation and removed pending triage labels Nov 28, 2022
@CodeDredd
Copy link
Owner

Yes nuxt-bridge or @nuxtjs/composition-api with nuxt2 is a requirement. I didn't mention it because pinia has the same requirement and since you need pinia for pinia-orm, i hadn't thought about the need to mention it.
But i try to add something.

@mackwic
Copy link
Author

mackwic commented Nov 28, 2022 via email

@CodeDredd
Copy link
Owner

I see ... Seems i released a @pinia-orm/nuxt version where the build is different. If you look there, there is working example with
@nuxtjs/composition-api : https://github.com/CodeDredd/pinia-orm/tree/master/playgrounds/nuxt2comp

@CodeDredd CodeDredd added the question Further information is requested label Nov 29, 2022
CodeDredd added a commit that referenced this issue Dec 6, 2022
* fix(pinia-orm): Query constraints with nested relations in m:m relations broken (#625)

* fix(pinia-orm): Query constraints with nested relations in m:m relations broken

* refactor(pinia-orm): remove skip in test

* feat(pinia-orm): Add the option to sort case insensitive with `sortBy` (#636)

* docs(pinia-orm): Add requirements info for nuxt 2 users (#638)

* refactor(normalizr): reduce code to only used by orm (#641)

* perf(pinia-orm-659): Save hydrated models if not updated (#671)

* perf(pinia-orm-659): Save hydrated models if not updated

* refactor(pinia-orm): typo

closes #659, #623, #628
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants