Open LuisGhz opened 1 year ago
I get the next error when import the library.
` Failed to resolve entry for package "http". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]
node_modules/esbuild/lib/main.js:1373:21: 1373 │ let result = await callback({ ╵ ^ at packageEntryFailure (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:28691:11) at resolvePackageEntry (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:28688:5) at tryNodeResolve (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:28419:20) at Context.resolveId (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:28180:28) at Object.resolveId (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:44207:64) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:65837:21 at async file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:39941:34 at async requestCallbacks.on-resolve (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:1373:22) at async handleRequest (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:729:13)
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1292:20: 1292 │ let promise = setup({ ╵ ^ at setup (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:39921:19) at handlePlugins (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:1292:21) at buildOrContextImpl (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:978:5) at Object.buildOrContext (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:786:5) at C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:2186:68 at new Promise (<anonymous>) at Object.context (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:2186:27) at Object.context (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:2026:58) at prepareEsbuildOptimizerRun (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:45967:35)
The plugin "vite:dep-pre-bundle" was triggered by this import
node_modules/link-exists/dist/index.esm.js:1:13: 1 │ import t from"http";const o=/(http(s)?:\/\/.)?(www\....
`
Same problem.
Let me take a look into the issue and get back with a solution.
I get the next error when import the library.
` Failed to resolve entry for package "http". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]
This error came from the "onResolve" callback registered here:
The plugin "vite:dep-pre-bundle" was triggered by this import
`