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
WARNING: No supported entry point detected for =>`luxon`
Learn more about these warnings at => https://greenwoodjs.dev/docs/introduction/web-standards/#import-maps
Details
So seems we need to add some additional heuristics which might now require actually having to read the entire contents of package.json though :/
for(constsegmentofsegments.slice(1)){if(fs.existsSync(newURL('./package.json',root))){constresolvedPackageJson=(awaitimport(newURL('./package.json',root),{with: {type: 'json'}})).default;const{ name, version, main, module, exports }=resolvedPackageJson;// name and version are required fields in a package.json_// https://docs.npmjs.com/cli/v10/configuring-npm/package-jsonif((name&&version)&&(main||module||exports)){break;}}root=root.replace(`${segment}/`,'');}
The text was updated successfully, but these errors were encountered:
thescientist13
changed the title
unable to resolve packages with a nested _package.json_
unable to resolve packages with a nested package.json
Dec 16, 2024
Type of Change
Bug
Summary
Found a case out in the wild where a package, in this case luxon has a nested package.json in its src/ folder, thus when we recursively walk up from the location returned from
import.meta.resolve
, we hit this false positive and thus exit the search too early.https://github.com/thescientist13/import-meta-resolve-luxon?tab=readme-ov-file#demo
file:///Users/path/to/.../node_modules/luxon/
file:///Users/path/to/.../node_modules/luxon/src/
And so in development and building up the import map, we'll get this diagnostic from Greenwood
thescientist13/HP_Stuff#1 (comment)
Details
So seems we need to add some additional heuristics which might now require actually having to read the entire contents of package.json though :/
The text was updated successfully, but these errors were encountered: