When trying to import a package that has a directory as its "main" field, there will be an error
example/example2.js:3: ERROR - Failed to load module "abc"
import abc from 'abc'
^
1 error(s), 0 warning(s)
node_modules
|-abc
|-build
-- index.js
--package.json
cat package.json
{"name":"abc", "main":"build"}
When trying to import a package that has a directory as its "main" field, there will be an error
cat package.json