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

Path issue with mix on fresh clone #5

Open
wdelfuego opened this issue Jul 17, 2022 · 5 comments
Open

Path issue with mix on fresh clone #5

wdelfuego opened this issue Jul 17, 2022 · 5 comments

Comments

@wdelfuego
Copy link

I just forked this repo because I want to play around with adding a search field (let me know if this is something you've already finished 😄).

But I couldn't run npm run on the freshly cloned tool until I changed line 19 of its webpack.mix.js file from:

'../../../vendor/laravel/nova/resources/js/mixins/packages.js'

to:

'../../vendor/laravel/nova/resources/js/mixins/packages.js'

Before I made that change, I got errors of this type:

ERROR in ./resources/js/components/FormField.vue?vue&type=script&lang=js (./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/FormField.vue?vue&type=script&lang=js) 1:0-66
Module not found: Error: Can't resolve 'laravel-nova' in '/app/nova-components/nova-map-field/resources/js/components'
ERROR in ./resources/js/components/form-fields/MultiPolygonFormField.vue?vue&type=script&lang=js (./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/form-fields/MultiPolygonFormField.vue?vue&type=script&lang=js) 1:0-66
Module not found: Error: Can't resolve 'laravel-nova' in '/app/nova-components/nova-map-field/resources/js/components/form-fields'
ERROR in ./resources/js/components/form-fields/PointFormField.vue?vue&type=script&lang=js (./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/form-fields/PointFormField.vue?vue&type=script&lang=js) 1:0-66
Module not found: Error: Can't resolve 'laravel-nova' in '/app/nova-components/nova-map-field/resources/js/components/form-fields'
ERROR in ./resources/js/components/form-fields/PolygonFormField.vue?vue&type=script&lang=js (./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/form-fields/PolygonFormField.vue?vue&type=script&lang=js) 1:0-66
Module not found: Error: Can't resolve 'laravel-nova' in '/app/nova-components/nova-map-field/resources/js/components/form-fields'
webpack compiled with 4 errors

Not sure if this is an issue caused by custom paths on my system or yours, I'll gladly create a pull request for this change if you think it should be changed.

@mostafaznv
Copy link
Owner

mostafaznv commented Jul 17, 2022

Hi @wdelfuego

No, I didn't started this feature yet.
But I'm going to start it tomorrow.

Anyway, as you said, this error is just because of difference of custom paths in my computer system and yours.

> app
> config
> ...
> packages/mostafaznv/nova-map-field
> vendor

As you can see, my local package is placed in that path and I'm using nova from that vendor (vendor of root folder) which is not correct 😁, but I'm OK with it for now.

@wdelfuego
Copy link
Author

Good to know 👍

You don’t think it’d be better for the project to come in a directly runnable state? Imo it’d be a shame to lose contributor time to needless debugging when they’re first looking into the project.

@mostafaznv
Copy link
Owner

Yes, you are right.

But I developed this package in hurry to use it in one of my own projects. so I decided to keep it as simple as I can.
In future versions, I will add more interesting features to it and I will fix that path issue.

And FYI, I started to work on Geocoder feature and I will release new version soon

@wdelfuego
Copy link
Author

While this issue lives in the codebase, anyone who is possibly interested in forking/contributing will run into this bug by default and will have to investigate themselves.

Until the repo is fixed I'd at least leave this issue open so people who run into it can easily find the solution here.

@mostafaznv mostafaznv reopened this Jul 18, 2022
@mostafaznv
Copy link
Owner

Issue reopened 😁

And I will fix it later. maybe 2 or 3 weeks later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants