You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While i'm using the above configuration and i try to do npm run watch, it works pretty well, but when i try to do npm run production i receive the following errors:
ERROR Failed to compile with 8 errors 10:10:47
error in ./~/toastr/toastr.less
Module build failed: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
at Array.forEach (<anonymous>)
at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
at <anonymous>
@ ./~/toastr/toastr.less 4:14-154
@ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./~/bootstrap-less/bootstrap/bootstrap.less ./resources/assets/less/adminlte-app.less ./~/toastr/toastr.less
error in ./~/bootstrap-less/bootstrap/bootstrap.less
Module build failed: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
at Array.forEach (<anonymous>)
at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
at <anonymous>
@ ./~/bootstrap-less/bootstrap/bootstrap.less 4:14-163
@ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./~/bootstrap-less/bootstrap/bootstrap.less ./resources/assets/less/adminlte-app.less ./~/toastr/toastr.less
error in ./resources/assets/less/adminlte-app.less
Module build failed: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
at Array.forEach (<anonymous>)
at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
at <anonymous>
@ ./resources/assets/less/adminlte-app.less 4:14-217
@ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./~/bootstrap-less/bootstrap/bootstrap.less ./resources/assets/less/adminlte-app.less ./~/toastr/toastr.less
error in ./resources/assets/sass/app.scss
Module build failed: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
at Array.forEach (<anonymous>)
at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
at <anonymous>
@ ./resources/assets/sass/app.scss 4:14-267
@ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./~/bootstrap-less/bootstrap/bootstrap.less ./resources/assets/less/adminlte-app.less ./~/toastr/toastr.less
error in ./resources/assets/sass/app.scss
Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
at Array.forEach (<anonymous>)
at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
at <anonymous>
at runLoaders (/home/matheus/Repositorios/fidelidade-online/node_modules/webpack/lib/NormalModule.js:192:19)
at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Promise.resolve.then.then.catch (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-loader/lib/index.js:189:71)
at <anonymous>
error in ./~/bootstrap-less/bootstrap/bootstrap.less
Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
at Array.forEach (<anonymous>)
at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
at <anonymous>
at runLoaders (/home/matheus/Repositorios/fidelidade-online/node_modules/webpack/lib/NormalModule.js:192:19)
at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Promise.resolve.then.then.catch (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-loader/lib/index.js:189:71)
at <anonymous>
error in ./resources/assets/less/adminlte-app.less
Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
at Array.forEach (<anonymous>)
at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
at <anonymous>
at runLoaders (/home/matheus/Repositorios/fidelidade-online/node_modules/webpack/lib/NormalModule.js:192:19)
at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Promise.resolve.then.then.catch (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-loader/lib/index.js:189:71)
at <anonymous>
error in ./~/toastr/toastr.less
Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
at Array.forEach (<anonymous>)
at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
at <anonymous>
at runLoaders (/home/matheus/Repositorios/fidelidade-online/node_modules/webpack/lib/NormalModule.js:192:19)
at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Promise.resolve.then.then.catch (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-loader/lib/index.js:189:71)
at <anonymous>
Asset Size Chunks Chunk Names
/js/app.9be25d8d3599f636ed1a.js 352 kB 0 [emitted] [big] /js/app
/js/app-landing.4e4cffbf4f5d977096ec.js 216 kB 1 [emitted] /js/app-landing
/js/app.9be25d8d3599f636ed1a.js.map 362 kB 0 [emitted] /js/app
/js/app-landing.4e4cffbf4f5d977096ec.js.map 221 kB 1 [emitted] /js/app-landing
mix-manifest.json 4.63 kB [emitted]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ production: `cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/matheus/.npm/_logs/2017-12-08T12_10_48_182Z-debug.log
I looked at the file: /node_modules/postcss-load-plugins/lib/plugins.js
And i noticed that on the following if statement: if (options === null || Object.keys(options).length === 0)
Its being tested only if the options object is null, if the object is not null it tries to
look at the keys of the object, but i believe that its being forgotten the case when the options object is undefined.
I changed my postcss.config.js to the following code:
And now both npm run watch and npm run production are working.
I don't know if any environment configuration could be useful, if someone need some just ask for it and i'll give it.
Thanks for your attention.
The text was updated successfully, but these errors were encountered:
Since this repo will be archived soon, I'm closing in favor of postcss-load-config #154. I copied the needed bits and will fix it asap. Thx for reporting 🎉
The provided configuration from https://github.com/postcss/postcss-loader for the postcss.config.js file is the following:
While i'm using the above configuration and i try to do npm run watch, it works pretty well, but when i try to do npm run production i receive the following errors:
I looked at the file: /node_modules/postcss-load-plugins/lib/plugins.js
And i noticed that on the following if statement:
if (options === null || Object.keys(options).length === 0)
Its being tested only if the options object is null, if the object is not null it tries to
look at the keys of the object, but i believe that its being forgotten the case when the options object is undefined.
I changed my postcss.config.js to the following code:
And now both npm run watch and npm run production are working.
I don't know if any environment configuration could be useful, if someone need some just ask for it and i'll give it.
Thanks for your attention.
The text was updated successfully, but these errors were encountered: