Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using with axios 1.7.8 #339

Open
lpicchi opened this issue Dec 3, 2024 · 2 comments
Open

Error when using with axios 1.7.8 #339

lpicchi opened this issue Dec 3, 2024 · 2 comments

Comments

@lpicchi
Copy link

lpicchi commented Dec 3, 2024

Bug report
I'm using bundle-declarations-webpack-plugin that uses this lib under the hood. After upgrading to axios 1.7.8 I got an error during types generation.

Error

LOG from BundleDeclarationsWebpackPlugin
<w> Failed to create .d.ts Error: Something went wrong - getSymbolsUsingSymbol returned null but expected to be a set of symbols (symbol=Cancel)
<w>     at getExportedSymbolsUsingSymbol (C:\Projects\comarb\comarb-bid-portal-api\node_modules\dts-bundle-generator\dist\bundle-generator.js:672:23)
<w>     at shouldSymbolBeImported (C:\Projects\comarb\comarb-bid-portal-api\node_modules\dts-bundle-generator\dist\bundle-generator.js:660:20)
<w>     at shouldNodeBeImported (C:\Projects\comarb\comarb-bid-portal-api\node_modules\dts-bundle-generator\dist\bundle-generator.js:636:20)
<w>     at forEachNodeThatShouldBeImported (C:\Projects\comarb\comarb-bid-portal-api\node_modules\dts-bundle-generator\dist\bundle-generator.js:376:21)
<w>     at updateImportsForStatement (C:\Projects\comarb\comarb-bid-portal-api\node_modules\dts-bundle-generator\dist\bundle-generator.js:382:13)
<w>     at updateResultImpl (C:\Projects\comarb\comarb-bid-portal-api\node_modules\dts-bundle-generator\dist\bundle-generator.js:130:29)
<w>     at updateResultForAnyModule (C:\Projects\comarb\comarb-bid-portal-api\node_modules\dts-bundle-generator\dist\bundle-generator.js:176:13)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\dts-bundle-generator\dist\bundle-generator.js:871:13
<w>     at Array.map (<anonymous>)
<w>     at generateDtsBundle (C:\Projects\comarb\comarb-bid-portal-api\node_modules\dts-bundle-generator\dist\bundle-generator.js:22:20)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\bundle-declarations-webpack-plugin\dist\index.cjs:1:978
<w>     at new Promise (<anonymous>)
<w>     at a (C:\Projects\comarb\comarb-bid-portal-api\node_modules\bundle-declarations-webpack-plugin\dist\index.cjs:1:925)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\bundle-declarations-webpack-plugin\dist\index.cjs:1:2926
<w>     at fn (C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:537:19)
<w>     at Hook.eval [as callAsync] (eval at create (C:\Projects\comarb\comarb-bid-portal-api\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:67:17)
<w>     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Projects\comarb\comarb-bid-portal-api\node_modules\tapable\lib\Hook.js:18:14)
<w>     at cont (C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3072:34)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3120:10
<w>     at symbolIterator (C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:3485:9)
<w>     at done (C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:3527:9)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:2830:7
<w>     at Object.each (C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:2857:9)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:4569:14
<w>     at symbolIterator (C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:3482:9)
<w>     at timesSync (C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:2297:7)
<w>     at Object.eachLimit (C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:3463:5)
<w>     at Compilation.createChunkAssets (C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:4546:12)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3115:14
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3296:6
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:2818:7
<w>     at done (C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:3522:9)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3259:8
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3369:32
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\HookWebpackError.js:68:3
<w>     at Hook.eval [as callAsync] (eval at create (C:\Projects\comarb\comarb-bid-portal-api\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
<w>     at Cache.store (C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Cache.js:107:20)
<w>     at ItemCacheFacade.store (C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\CacheFacade.js:141:15)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3369:11
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Cache.js:93:5
<w>     at Hook.eval [as callAsync] (eval at create (C:\Projects\comarb\comarb-bid-portal-api\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
<w>     at Cache.get (C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Cache.js:75:18)
<w>     at ItemCacheFacade.get (C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\CacheFacade.js:115:15)
<w>     at Compilation._codeGenerationModule (C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3338:9)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3245:11
<w>     at arrayIterator (C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:3467:9)
<w>     at done (C:\Projects\comarb\comarb-bid-portal-api\node_modules\neo-async\async.js:3527:9)
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3259:8
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\Compilation.js:3369:32
<w>     at C:\Projects\comarb\comarb-bid-portal-api\node_modules\webpack\lib\HookWebpackError.js:68:3
+ 1 hidden lines

Additional context
I think this is related to this change in Axios but really don't have the time to inspect it right now and my knowledge in the inner workings of this lib is really scarce.

NOTE: If anyone having this same error just downgrade axios to 1.7.7

@lpicchi lpicchi changed the title Error when with axios 1.7.8 Error when using with axios 1.7.8 Dec 3, 2024
@timocov
Copy link
Owner

timocov commented Dec 5, 2024

Are you able to reproduce the same issue without using that plugin? If so, is it possible to share a repro here?

@lpicchi
Copy link
Author

lpicchi commented Dec 5, 2024

Sure!

https://github.com/lpicchi/dts-bundle-generator-axios-bug

Success with axios 1.7.7:

image

image

Error with axios 1.7.8:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants