Skip to content

Nova field mixin error each time nova updates #5551

@RealityGamin

Description

@RealityGamin
  • Laravel Version: master
  • Nova Version: master
  • PHP Version: 8.2

Description:

[jangan@web Permissions]$ npm run watch

> watch
> mix watch


✖ Mix
  Compiled with some errors in 803.39ms

ERROR in ../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js 7:0-46
Module not found: Error: Can't resolve 'axios' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js 8:0-39
Module not found: Error: Can't resolve 'lodash/debounce' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js 9:0-33
Module not found: Error: Can't resolve 'lodash/forIn' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js 10:0-29
Module not found: Error: Can't resolve 'lodash/get' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js 11:0-39
Module not found: Error: Can't resolve 'lodash/identity' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js 12:0-37
Module not found: Error: Can't resolve 'lodash/isEmpty' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js 13:0-33
Module not found: Error: Can't resolve 'lodash/isNil' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js 14:0-35
Module not found: Error: Can't resolve 'lodash/pickBy' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/FormEvents.js 1:0-33
Module not found: Error: Can't resolve 'lodash/isNil' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/FormField.js 7:0-29
Module not found: Error: Can't resolve 'lodash/get' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/FormField.js 8:0-33
Module not found: Error: Can't resolve 'lodash/isNil' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/HandlesFieldAttachments.js 5:0-49
Module not found: Error: Can't resolve 'form-backend-validation' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/HandlesFieldAttachments.js 6:0-33
Module not found: Error: Can't resolve 'lodash/isNil' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/HandlesFormRequest.js 1:0-49
Module not found: Error: Can't resolve 'form-backend-validation' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/HandlesPanelVisibility.js 1:0-31
Module not found: Error: Can't resolve 'lodash/each' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/HandlesPanelVisibility.js 2:0-35
Module not found: Error: Can't resolve 'lodash/filter' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/HandlesValidationErrors.js 1:0-49
Module not found: Error: Can't resolve 'form-backend-validation' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/HasCards.js 5:0-35
Module not found: Error: Can't resolve 'lodash/filter' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/PreventsFormAbandonment.js 7:0-48
Module not found: Error: Can't resolve 'vuex' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/PreventsFormAbandonment.js 8:0-45
Module not found: Error: Can't resolve '@inertiajs/inertia' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/PreventsModalAbandonment.js 7:0-48
Module not found: Error: Can't resolve 'vuex' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/packages.js 17:0-49
Module not found: Error: Can't resolve 'form-backend-validation' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/mixins/propTypes.js 1:0-31
Module not found: Error: Can't resolve 'lodash/pick' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/mixins'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/util/filled.js 1:0-33
Module not found: Error: Can't resolve 'lodash/isNil' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/util'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

ERROR in ../../vendor/laravel/nova/resources/js/util/localization.js 1:0-37
Module not found: Error: Can't resolve 'lodash/forEach' in '/var/www/html/hrms/vendor/laravel/nova/resources/js/util'
Did you miss the leading dot in 'resolve.extensions'? Did you mean '[".*",".wasm",".mjs",".js",".jsx",".json",".vue"]' instead of '["*",".wasm",".mjs",".js",".jsx",".json",".vue"]'?

webpack compiled with 25 errors

Detailed steps to reproduce the issue on a fresh Nova installation:

I have a php artisan laravel nova:field hrms/permissions

Each time composer updates, I can no longer compile the permissions, i tried to npm install then npm run watch

In the FormField im using:

<script>
import { FormField, HandlesValidationErrors } from 'laravel-nova';

export default {
    mixins: [FormField, HandlesValidationErrors],

    props: ['resourceName', 'resourceId', 'field'],

If i remove the mixins, it will compile no issue, and this issue only happens with nova:field, no other tools or resource-tools break ever, something is making mixins and importing the FormField break each time nova updates.

Same issue if i create a new nova:field, and this issue only happens with nova fields.

### Update:

So after reading all the previous reports from 1 year ago, this issue was fixed by doing: #3844 (comment)

npm run nova:install

Inside my own custom field folder, which is odd.

Just a reminder, this will always happen, everytime nova updates, not sure if you want to mark it as a bug or close but, here we go at least a weird solution works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions