Laravel Nova:TypeError:无法将未定义或null转换为对象

时间:2019-05-08 12:57:23

标签: laravel npm laravel-nova

我一直试图在我的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)```

0 个答案:

没有答案