liady / webpack-node-externals

Easily exclude node modules in Webpack
MIT License
1.3k stars 62 forks source link

WARNING: Could not determine version of module x #103

Closed axelblomberg closed 3 years ago

axelblomberg commented 3 years ago

Error example in detail Serverless: Invoke webpack:package Serverless: WARNING: Could not determine version of module arrify

Hi. We have an issue where our root hoisted dependencies (using Lerna) cannot be resolved correctly when we bundle and webpack:package runs. This is causing the bundled package.json file to include referenced version as an empty string, see below.

"dependencies": { "arrify": "", }

The general issue with this is that dependencies are automatically resolved to latest version which can cause issues if there are breaking changes and so on.

I noticed that there were a version published 8 hours ago by @j0k3r where this functionality was included;

image

However, this did not seem to do the trick. Anyone with similar issues using monorepo, serverless and serverless-webpack?

axelblomberg commented 3 years ago

Sorry, this was posted in the wrong github repo. Please remove.