I create a simple android hello-world project (nativescript angular) latest or v17 and it run normal, then I install axios npm i axios
if I try a simples get a lot errors happens. I installed some different libraries to webservice consume and always I’m getting the same error:
async loadCities() {
try {
const response = await axios.get(this.getPath('some'), {
headers: {
Authorization: `${this.apiKey}`
}
})
}
catch (error) {
console.error('loadCities-> error: ', error)
}
}
erros happens before install on device emulator or phisical device.
ERROR in ./node_modules/combined-stream/lib/combined_stream.js 1:11-26
Module not found: Error: Can't resolve 'util' in 'C:UsersmDesktopnsAplicativonode_modulescombined-streamlib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
...
even after install a lot this libriries, the error continues:
npm install 'stream-browserify'
npm install 'path-browserify'
npm install 'url'
npm install 'os-browserify'
npm install 'stream-http'
npm install 'https-browserify'
npm install 'assert'
Can you give a light about this problem?