turf icon indicating copy to clipboard operation
turf copied to clipboard

Module federation "No version specified" warning

Open byv55f5f5 opened this issue 2 years ago • 4 comments

I use @turf/[email protected] with webpack federation. And the warning show on the screen.

Compiled with problems:X

WARNING in shared module @turf/turf -> C:\Users\work\repo\my_project\node_modules\@turf\turf\dist\es\index.js

No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.

Seems like the version should added in node_modules\@turf\turf\dist\es\package.json

  • webpack: 5.65.0
  • Browser: Microsoft edge v99.0.1150.36
  • turf: 6.5.0

byv55f5f5 avatar Mar 10 '22 07:03 byv55f5f5

Facing the same issue in turf version 7.0.0-alpha.0

ajaybhayani741 avatar Feb 23 '23 09:02 ajaybhayani741

Any progress with this? I have the same issue with version 6.5.0 in a react app

kboul avatar Mar 23 '23 12:03 kboul

Hi @byv55f5f5 Can you explain how this should work? Viewing the contents of package.json at https://www.npmjs.com/package/@turf/turf?activeTab=code version is definitely set.

smallsaucepan avatar Dec 17 '23 05:12 smallsaucepan

Hi @smallsaucepan , The file path of package.json I meant is node_modules\@turf\turf\dist\es\package.json. There are only {"type":"module"} specified in that file.

I added the version like this comment said: https://github.com/webpack/webpack/issues/13457#issuecomment-1556980850

But now, I looked at the discussions on that issue. It seems like a problem that Webpack should resolve.

byv55f5f5 avatar Dec 18 '23 02:12 byv55f5f5