hikarugo
V2EX  ›  Node.js

yarn 安装的包, vscode 就无法提示导入,有救吗

  •  
  •   hikarugo · Oct 22, 2023 · 1638 views
    This topic created in 967 days ago, the information mentioned may be changed or developed.
    同样一个包,import 进来之后,如果是 npm 安装的,在使用的包的变量的时候(比如 axios ),可以使用 qucik fix 弹出提示然后选择导入,使用 yarn 安装就没有这个提示。

    npm 实在是太慢太慢了,安装速度全看脸,有的时候我点开 lock 的地址然后几十 k 的东西,浏览器直接秒下了,npm 能死活给你卡到死,而且还看不到进度,都不知道死哪了。挂梯子换源都没用,真的折磨。
    3 replies    2023-10-23 14:55:46 +08:00
    cdswyda
        1
    cdswyda  
       Oct 23, 2023
    虽然知道 yarn ,但是只用 npm/pnpm ,给 npm 设置个 registry 没遇到过啥问题。
    yarn 和 cnpm 倒是踩过类似的坑,不知道为啥,反正安装后有问题,就再也没用过了。
    Opportunity
        2
    Opportunity  
       Oct 23, 2023
    https://yarnpkg.com/getting-started/editor-sdks

    文档不是有写吗,PNP 就是事情多,不如用 pnpm 吧
    luckybricks9711
        3
    luckybricks9711  
       Oct 23, 2023
    webstorm 对 pnp 引入资源有比较好的支持
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3203 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 13:44 · PVG 21:44 · LAX 06:44 · JFK 09:44
    ♥ Do have faith in what you're doing.