crystalfp opened a new issue, #332: URL: https://github.com/apache/couchdb-nano/issues/332
<!--- Provide a general summary of the issue in the Title above --> ## Expected Behavior Used nano without errors under Node 20.4.0. I want to use the exactly same code under Electron that bundles Node 18.16.1 ## Current Behavior At the first call to nano ``` import Nano from "nano"; const nano = Nano({url: "my-CouchDB-url", requestDefaults: {timeout: 120_000}}); const databaseList = await nano.db.list(); ``` I receive the error: ``` Adapter 'http' is not available in the build ``` Seems the error is generated by `axios` and seems the solution is to move to `fetch`. There is a possible workaround at https://github.com/axios/axios/issues/5523 but setting `agent` in the `requestDefaults` has no effect. ## Possible Solution 1) scrap axios and use fetch :-) 2) document a way to change axios adapter from outside. Agent option seems that does not change anything. <!--- Not obligatory, but suggest a fix/reason for the bug, --> <!--- or ideas how to implement the addition or change --> ## Steps to Reproduce (for bugs) <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug. Include code to reproduce, if relevant --> 1. Create an Electron application 2. In the main.js (that is, the Node process) add the lines listed above (putting a known CouchDB url). 3. Run `npm run dev` 4. See the error ## Context Well, this problem blocks entirely my porting of the client-server application under Electron. If there is no solution I have to scrap CouchDB and move to another DB. ## Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * Version used: 10.1.2 * Browser Name and version: Electron 26.0.0 that runs Node 18.16.1. Not run in browser. * Operating System and version (desktop or mobile): Windows 11 64bits desktop * Link to your project: Not public -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org