Hovering on "npm:axios" & caching do nothing
Using deno script
Have an import as
import axios from "npm:axios";
it should error (red lines below text)
I hover over it & click on quick fix > cache dependency.
It did nothing. The workspace was not created by me. But I have admin access in it , i think (will confirm once)
Surprisingly, in another workspace which I created, it actually cached the axios npm lib & error went away.10 Replies
who created the workspace should have no effect on this
lsp can be a bit flaky at times
we are not using caddy, we converted to nginx and i set the config for lsp as
But if it worked in one scenario it means it is correct
will try with another workspace created by me & revert. just to get reproducible issue
(maybe it could be this issue)
No I can guarantee you it has nothing to do with the workspace
I wrote the implementation
oh 😅
cool cool
any idea or workaround for this then ?
i am forced to use deno axios-like instead of npm axios
reload the page, it might just work
tried just now, did not worked
Getting this in websocket response
update: I am now using
import axios from 'https://esm.sh/axios';
and this seems to solve the issue with npm:axios
question, are you sure axios expose types ?
Deno
npm: specifiers | Manual | Deno
Since version 1.28, Deno has native support for importing npm packages. This is
done by importing using
npm:
specifiers.I think yes https://www.npmjs.com/package/axios#typescript
npm
axios
Promise based HTTP client for the browser and node.js. Latest version: 1.4.0, last published: a month ago. Start using axios in your project by running
npm i axios
. There are 102678 other projects in the npm registry using axios.because I have been using axios in my nodeTS project