Open Drewster727 opened 5 years ago
hi @Drewster727 did you manage to solve the problem? am having very similar sounding issue (as same setup)
It's all a bit weird, in my case, 50% of time it works 50%, just doing another build nothing else.
What I managed to find is that, when it works the code generated has: `/***/ (function(module, exports, __webpack_require__) {
var WEBPACK_AMD_DEFINE_FACTORY, WEBPACK_AMD_DEFINE_ARRAY, WEBPACK_AMD_DEFINE_RESULT;var WEBPACK_AMD_DEFINE_FACTORY, WEBPACK_AMD_DEFINE_ARRAY, WEBPACK_AMD_DEFINE_RESULT; (function(root, factory) { if (true) { // AMD. Register as an anonymous module. if (typeof window === 'object' && window.DOMImplementation && window.XMLSerializer && window.DOMParser) { !(WEBPACK_AMD_DEFINE_ARRAY = [], WEBPACK_AMD_DEFINE_FACTORY = (factory(window)), WEBPACK_AMD_DEFINE_RESULT = (typeof WEBPACK_AMD_DEFINE_FACTORY === 'function' ? (WEBPACK_AMD_DEFINE_FACTORY.apply(exports, WEBPACK_AMD_DEFINE_ARRAY)) : WEBPACK_AMD_DEFINE_FACTORY), WEBPACK_AMD_DEFINE_RESULT !== undefined && (module.exports = WEBPACK_AMD_DEFINE_RESULT)); } else { !(WEBPACK_AMD_DEFINE_ARRAY = [], WEBPACK_AMD_DEFINE_FACTORY = (factory(webpack_require(489), true)), WEBPACK_AMD_DEFINE_RESULT = (typeof WEBPACK_AMD_DEFINE_FACTORY === 'function' ? (WEBPACK_AMD_DEFINE_FACTORY.apply(exports, WEBPACK_AMD_DEFINE_ARRAY)) : WEBPACK_AMD_DEFINE_FACTORY), WEBPACK_AMD_DEFINE_RESULT !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } }
when it doesn't the check if the window is defined is missing, any ideas anyone?
This is a Question
Description
I have a node project using serverless + webpack. I am having an issue where my lambda cannot find a node dependency even though it is specified in my package.json and it is getting loaded locally.
serverless.yml
package.json dependencies
In my local node_modules folder, I see these wdio dependency folders as expected:
However, when I run
serverless package
and inspect the zip file produced, I see the node_modules folder is missing those key dependencies:Where is everything else?
Finally, here is my webpack.config.js file:
What am I missing here?
Additional Data