Closed AdilinkOrg closed 1 year ago
I'm getting same from npm:
ERROR in ./node_modules/axios-extensions/esm/utils/buildSortedURL.js 7:0-50
Module not found: Error: Package path ./lib/helpers/buildURL is not exported from package
Axios 1.x has a little breaking changes in its package.json, you could downgrade axios to 0.x as a workaround, I will look into it later and try to solve it really.
I have the same issue. I would be appreciate it if appears another solution than downgrading axios version
I also have the same issue
We’re all waiting for that problem to go away.
Same issue here :(
@AniaKru95
It should be the reason for axios the new version of the configuration. Now I temporarily use the alias method, which is feasible.
config.resolve.alias.set('axios', join(__dirname, '../node_modules/axios'));
@AniaKru95 It should be the reason for axios the new version of the configuration. Now I temporarily use the alias method, which is feasible.
config.resolve.alias.set('axios', join(__dirname, '../node_modules/axios'));
I am having the same problem. How would I use the alias method with vue / vite? Thanks.
add this resolve: { alias: { // Fix: Missing "./lib/helpers/buildURL" specifier in "axios" package 'axios/lib': path.resolve(__dirname, './node_modules/axios/lib') } }
in vite config
Axios 1.x has a little breaking changes in its package.json, you could downgrade axios to 0.x as a workaround, I will look into it later and try to solve it really.
@kuitos any luck? Just tried 1.x.x today and still broken
about ./lib/
,perhaps can refer to https://github.com/axios/axios/issues/5072 and https://github.com/axios/axios/pull/5136, the result is https://github.com/axios/axios/pull/5136#issuecomment-1289042917.
add this
resolve: { alias: { // Fix: Missing "./lib/helpers/buildURL" specifier in "axios" package 'axios/lib': path.resolve(__dirname, './node_modules/axios/lib') } }
in vite config
Nice, thanks! I was able to use a similar config in next.js by updating next.config.jx
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
// Fix: Missing "./lib/helpers" specifier in "axios" package
'axios/lib': path.resolve(__dirname, './node_modules/axios/lib'),
}
return config;
}
i'm also facing this issue -
node_modules/axios-extensions/esm/utils/buildSortedURL.js:7:21: 7 │ import buildURL from 'axios/lib/helpers/buildURL';
if i downgrade to lower version of axios 0.x, the ordercloud-sdk is getting break since its expecting 1.1.3
can anyone help on this
@Dhana-tech-code are you using Vite, or NextJS? If so, there are two solutions posted above for each framework
Hello, I have encountered the following error.
X [ERROR] [plugin vite:dep-pre-bundle] Missing "./lib/helpers/buildURL" export in "axios" package
https://github.com/kuitos/axios-extensions/blob/0b64fd7b155efe0fa65d1025da3ed04d65faef5f/src/utils/buildSortedURL.ts#L8