npm run build chrome - WebpackOptionsValidationError:
Closed this issue · 1 comments
vlagorce commented
After running successfully
yo web-extension
I got the folowing error when running
npm run build chrome
wallext@0.0.1 build /home/XXX/XXX/chrome/wallext
webextension-toolbox build "chrome"
/home/XXX/XXX/chrome/wallext/node_modules/webpack/lib/webpack.js:19
throw new WebpackOptionsValidationError(webpackOptionsValidationErrors);
^
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.entry should be one of these:
object { <key>: non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function
-> The entry point(s) of the compilation.
Details:
* configuration.entry should not be empty.
-> Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.
* configuration.entry should be a string.
-> An entry point without name. The string is resolved to a module which is loaded upon startup.
* configuration.entry should be an array:
[non-empty string]
* configuration.entry should be an instance of function
-> A Function returning an entry object, an entry string, an entry array or a promise to these things.
at webpack (/home/XXX/XXX/chrome/wallext/node_modules/webpack/lib/webpack.js:19:9)
at compile (/home/XXX/XXX/chrome/wallext/node_modules/webextension-toolbox/src/index.js:188:10)
at Command.build (/home/XXX/XXX/chrome/wallext/node_modules/webextension-toolbox/bin/webextension-toolbox:43:5)
at Command.listener (/home/XXX/XXX/chrome/wallext/node_modules/commander/index.js:315:8)
at emitTwo (events.js:126:13)
at Command.emit (events.js:214:7)
at Command.parseArgs (/home/XXX/XXX/chrome/wallext/node_modules/commander/index.js:653:12)
at Command.parse (/home/XXX/XXX/chrome/wallext/node_modules/commander/index.js:475:21)
at Object.<anonymous> (/home/XXX/XXX/chrome/wallext/node_modules/webextension-toolbox/bin/webextension-toolbox:54:9)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Function.Module.runMain (module.js:684:10)
at startup (bootstrap_node.js:187:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wallext@0.0.1 build: `webextension-toolbox build "chrome"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wallext@0.0.1 build 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/XXX/.npm/_logs/2018-01-11T11_43_41_207Z-debug.log
HaNdTriX commented
Thanks a lot for reporting this!
We fixed this issue in the latest version (v0.0.8) of https://github.com/HaNdTriX/webextension-toolbox.
Just run npm update webextension-toolbox
and the issue should be gone.