Laravel Nova: TypeError: Невозможно преобразовать неопределенный или нулевой объект - PullRequest
0 голосов
/ 08 мая 2019

Я пытался запустить npm run watch в своей папке vendor\Laravel\Nova, но я получаю эту ошибку. Я удалил / переустановил webpack и laravel-nova и все еще имею ту же ошибку. Запустил npm install и добавил все зависимости. То же самое с composer install.

Я также удалил папку node_module и переустановил все. Я переименовал webpack.mix.js.dist в webpack.mix.js.

Любые советы о том, как заставить это работать?

Спасибо!

> @ watch /var/site/vendor/laravel/nova
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

/var/www/site/vendor/laravel/nova/node_modules/webpack-cli/bin/cli.js:74
                throw err;
                ^

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at mergeObject (/var/www/site/vendor/laravel/nova/node_modules/deepmerge/dist/umd.js:55:9)
    at deepmerge (/var/www/site/vendor/laravel/nova/node_modules/deepmerge/dist/umd.js:79:10)
    at reduce (/var/www/site/api/vendor/laravel/nova/node_modules/babel-merge/dist/index.js:30:44)
    at Array.reduce (<anonymous>)
    at mergeArray (/var/www/site/vendor/laravel/nova/node_modules/babel-merge/dist/index.js:20:36)
    at babelMerge (/var/www/site/vendor/laravel/nova/node_modules/babel-merge/dist/index.js:41:19)
    at values.reduce (/var/www/site/vendor/laravel/nova/node_modules/babel-merge/dist/index.js:60:26)
    at Array.reduce (<anonymous>)
    at Function.value (/var/www/site/api/vendor/laravel/nova/node_modules/babel-merge/dist/index.js:58:49)
    at Function.generate (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/src/BabelConfig.js:11:22)
    at Object.babel (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/src/config.js:121:45)
    at JavaScript.webpackRules (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/src/components/JavaScript.js:76:41)
    at ComponentFactory.applyRules (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/src/components/ComponentFactory.js:155:23)
    at Mix.listen.rules (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/src/components/ComponentFactory.js:66:48)
    at events.(anonymous function).forEach.handler (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/src/Dispatcher.js:34:47)
    at Array.forEach (<anonymous>)
    at Dispatcher.fire (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/src/Dispatcher.js:34:28)
    at Mix.dispatch (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/src/Mix.js:119:25)
    at WebpackConfig.buildRules (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/src/builder/WebpackConfig.js:83:13)
    at WebpackConfig.build (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/src/builder/WebpackConfig.js:23:14)
    at Object.<anonymous> (/var/www/site/vendor/laravel/nova/node_modules/laravel-mix/setup/webpack.config.js:29:38)
    at Module._compile (/var/www/site/vendor/laravel/nova/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:747:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:568:12)
    at Function.Module._load (internal/modules/cjs/loader.js:560:3)
    at Module.require (internal/modules/cjs/loader.js:665:17)
    at require (/var/www/gmg/api/vendor/laravel/nova/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at WEBPACK_OPTIONS (/var/www/site/vendor/laravel/nova/node_modules/webpack-cli/bin/utils/convert-argv.js:115:13)
    at requireConfig (/var/www/site/vendor/laravel/nova/node_modules/webpack-cli/bin/utils/convert-argv.js:117:6)
    at /var/www/site/vendor/laravel/nova/node_modules/webpack-cli/bin/utils/convert-argv.js:124:17
    at Array.forEach (<anonymous>)
    at module.exports (/var/www/site/vendor/laravel/nova/node_modules/webpack-cli/bin/utils/convert-argv.js:122:15)
    at yargs.parse (/var/www/site/vendor/laravel/nova/node_modules/webpack-cli/bin/cli.js:71:45)
    at Object.parse (/var/www/site/vendor/laravel/nova/node_modules/yargs/yargs.js:567:18)```
...