Nothing is appearing #5

Closed
opened 2023-01-07 17:27:10 +00:00 by lucax88x · 9 comments
lucax88x commented 2023-01-07 17:27:10 +00:00

Info

  • Operating System: macos 12.6
  • NVIM v0.9.0-dev-1832+g08ebf8d3a-dirty
  • Node package manager:
  • v18.12.1

Configuration

return {
  "barrett-ruth/import-cost.nvim",
  build = "sh install.sh npm",
  config = function()
    require("import-cost").setup({})
  end,
}

Description

not appearing at all, do you need more info?
project is a pnpm one, but it still has a package.json

### Info - Operating System: macos 12.6 - NVIM v0.9.0-dev-1832+g08ebf8d3a-dirty - Node package manager: - v18.12.1 ### Configuration ```lua return { "barrett-ruth/import-cost.nvim", build = "sh install.sh npm", config = function() require("import-cost").setup({}) end, } ``` </details> ### Description not appearing at all, do you need more info? project is a pnpm one, but it still has a package.json
barrettruth commented 2023-01-07 19:28:47 +00:00

Several things:

  1. Are you using CommonJS or ES Modules?
  2. Replicate the issue with a single file and attach it
  3. Call the script like below so I can see if it is a problem with the npm module or the import-cost.nvim itself (I have had the npm module crap out and give me no results in testing before):
cat <your-file> | node <path-to-plugin-dir/import-cost.nvim/import-cost/index.js> <your-file> <extension>

image

Several things: 1. Are you using CommonJS or ES Modules? 2. Replicate the issue with a single file and attach it 3. Call the script like below so I can see if it is a problem with the npm module or the import-cost.nvim itself (I have had the npm module crap out and give me no results in testing before): ```sh cat <your-file> | node <path-to-plugin-dir/import-cost.nvim/import-cost/index.js> <your-file> <extension> ``` ![image](https://user-images.githubusercontent.com/62671086/211167425-224524d8-12ab-4bee-a8c1-d302e8b70bd8.png)
barrettruth commented 2023-01-09 21:57:07 +00:00

Sorry for the prod @lucax88x. Any updates on this?

Sorry for the prod @lucax88x. Any updates on this?
lucax88x commented 2023-01-09 22:21:39 +00:00

Sorry bud, first day after vacations.

Looks like that using npm works fine, I was using pnpm before and didn't work, need to check it better.

Sorry to wasting your time.

Sorry bud, first day after vacations. Looks like that using npm works fine, I was using pnpm before and didn't work, need to check it better. Sorry to wasting your time.
barrettruth commented 2023-01-09 22:48:35 +00:00

The npm module has a lot of weird features and isn't very consistent. Glad you got it resolved, I'll add a note to the readme.

The npm module has a lot of weird features and isn't very consistent. Glad you got it resolved, I'll add a note to the readme.
ryoppippi commented 2023-09-18 08:57:16 +00:00

@lucax88x
Hi!
If you are interested, try to use bun to install dependencies!
It is really faster than pnpm

@lucax88x Hi! If you are interested, try to use bun to install dependencies! It is really faster than pnpm
ryoppippi commented 2023-09-18 08:59:26 +00:00

Also, I think this problem comes from the lack of deps of import-cost.
You can contribute to import-cost itself

Also, I think this problem comes from the lack of deps of import-cost. You can contribute to import-cost itself
barrettruth commented 2023-09-18 16:02:38 +00:00

I recently switched to pnpm. And I don't think it's a good move to move to bun (yet). Tracking an upstream in pnpm.

I recently switched to pnpm. And I don't think it's a good move to move to bun (yet). Tracking an upstream in pnpm.
annymosse commented 2024-04-26 20:49:20 +00:00

This maybe a helpful for someone, as a work around go to the neovim pluggins folder and reinstall the packages in a flat structure; in my case :

cd ~/.local/share/nvim/lazy/import-cost/import-cost/
pnpm install --shamefully-hoist

to re-install the packages similarly to npm & yarn in a flat structure.

This maybe a helpful for someone, as a work around go to the neovim pluggins folder and reinstall the packages in a flat structure; in my case : ```bash cd ~/.local/share/nvim/lazy/import-cost/import-cost/ pnpm install --shamefully-hoist ``` to re-install the packages similarly to npm & yarn in a flat structure.
netrolite commented 2024-05-10 16:30:56 +00:00

This maybe a helpful for someone, as a work around go to the neovim pluggins folder and reinstall the packages in a flat structure; in my case :

cd ~/.local/share/nvim/lazy/import-cost/import-cost/
pnpm install --shamefully-hoist

to re-install the packages similarly to npm & yarn in a flat structure.

This didn't fix it for me unforutunately

> This maybe a helpful for someone, as a work around go to the neovim pluggins folder and reinstall the packages in a flat structure; in my case : > > ```shell > cd ~/.local/share/nvim/lazy/import-cost/import-cost/ > pnpm install --shamefully-hoist > ``` > > to re-install the packages similarly to npm & yarn in a flat structure. This didn't fix it for me unforutunately
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/import-cost.nvim#5
No description provided.