sapphiredev/shapeshift

bug: Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import

JPBM135 opened this issue · 4 comments

Is there an existing issue for this?

  • I have searched the existing issues (The #155 is about it too)

Description of the bug

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'c:\Users\jpedr\Desktop\Visual Code\Node.js\Botter V4.1\node_modules\fast-deep-equal\es6' is not supported resolving ES modules imported from c:\Users\jpedr\Desktop\Visual Code\Node.js\Botter V4.1\node_modules\@sapphire\shapeshift\dist\index.mjs
Did you mean to import fast-deep-equal/es6/index.js?
    at new NodeError (node:internal/errors:371:5)
    at finalizeResolution (node:internal/modules/esm/resolve:390:17)
    at moduleResolve (node:internal/modules/esm/resolve:915:10)
    at defaultResolve (node:internal/modules/esm/resolve:1005:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
    at link (node:internal/modules/esm/module_job:78:36) {
  code: 'ERR_UNSUPPORTED_DIR_IMPORT',
  url: 'file:///c:/Users/jpedr/Desktop/Visual%20Code/Node.js/Botter%20V4.1/node_modules/fast-deep-equal/es6'
}
    at consoleBoth (file:///c:/Users/jpedr/Desktop/Visual%20Code/Node.js/Botter%20V4.1/src/Functions/Errors/catchHandlers.js:78:10)
    at nullCatch (file:///c:/Users/jpedr/Desktop/Visual%20Code/Node.js/Botter%20V4.1/src/Functions/Errors/catchHandlers.js:3:2)
    at async FileLoader.load (file:///c:/Users/jpedr/Desktop/Visual%20Code/Node.js/Botter%20V4.1/src/Structures/Utils/FileLoader.js:71:26)
    at async loadCommands (file:///c:/Users/jpedr/Desktop/Visual%20Code/Node.js/Botter%20V4.1/src/Structures/Client/Client.js:190:15)
    at async extendClient (file:///c:/Users/jpedr/Desktop/Visual%20Code/Node.js/Botter%20V4.1/src/Structures/Client/Client.js:123:3)
    at async file:///c:/Users/jpedr/Desktop/Visual%20Code/Node.js/Botter%20V4.1/src/index.js:96:1

Steps To Reproduce

Using the tree:

discord.js@14.0.0-dev.1657671090-1ed605e
  └─┬ @discordjs/builders@0.16.0-dev.1657671102-1ed605e
       └── @sapphire/shapeshift@3.5.0

The error is throw

Expected behavior

The #155 should be fixed this issue, but the compiled index.mjs still throws the error

Screenshots

No response

Additional context

No response

favna commented

#155 hasn't been released yet, ergo you're still getting the error. You can see on the commits page that we haven't released 3.5.1 yet. https://github.com/sapphiredev/shapeshift/commits/main

favna commented

As per the above, closing as duplicate of #157

favna commented

One more note, using resolutions (yarn) / overrides (npm) / pnpm.overrides (pnpm) you can force shapeshift to the next version which at time of writing is 3.5.1-next.31b762e.0

Thanks, sorry for the inconvenience