Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM installer gets an ENOENT error with 'nft.storage' in package.json #2625

Open
sisittu99 opened this issue May 6, 2024 · 2 comments
Open
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization

Comments

@sisittu99
Copy link

As written in the title, I was not able to install anything in my TS project whenever nft.storage was inside my package.json.

versions

On package.json:

  • "ts-node": "^10.9.2",
  • "nft.storage": "^7.1.1",
  • "typescript": "^5.2.2"

On terminal (Powershell):

  • npm -v: 10.7.0
  • nvm -v: 1.1.12
  • nvm current: v20.11.0

expected behaviour

npm i installs any packages, included yours.

actual behaviour

npm i does not finishes the process and so does not create the package-lock.json, except when I remove nft.storage from package.json

logs

122 verbose stack Error: ENOENT: no such file or directory, lstat
122 verbose stack     at lstat (node:internal/fs/promises:915:32)
122 verbose stack     at C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\bin-links\lib\shim-bin.js:50:14
122 verbose stack     at Array.map (<anonymous>)
122 verbose stack     at shimBin (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\bin-links\lib\shim-bin.js:50:5)
122 verbose stack     at linkBins (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\bin-links\lib\link-bins.js:18:19)
122 verbose stack     at binLinks (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\bin-links\lib\index.js:25:5)
122 verbose stack     at #createBinLinks (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\rebuild.js:386:15)
122 verbose stack     at #linkAllBins (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\rebuild.js:372:41)
122 verbose stack     at #build (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\rebuild.js:160:30)
122 verbose stack     at async Arborist.rebuild (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\rebuild.js:62:5)
123 verbose cwd C:\Users\MY_USER\MY_PROJECT_PATH
124 verbose Windows_NT 10.0.22631
125 verbose node v20.11.0
126 verbose npm  v10.7.0
127 error code ENOENT
128 error syscall lstat
129 error errno -4058
130 error enoent ENOENT: no such file or directory, lstat
131 error enoent This is related to npm not being able to find a file.
131 error enoent
132 verbose exit -4058

Another kind of logs I received was:

124 verbose stack Error: ENOENT: no such file or directory, rename -> 'C:\Users\MY_USER\MY_PROJECT_PATH\node_modules\.bin\.🚘.ps1-vyTSC4AN'
124 verbose stack     at Object.rename (node:internal/fs/promises:732:18)
124 verbose stack     at moveFile (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\@npmcli\fs\lib\move-file.js:30:14)
124 verbose stack     at async Promise.allSettled (index 62)
124 verbose stack     at async [reifyPackages] (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:251:11)
124 verbose stack     at async Arborist.reify (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:170:5)
124 verbose stack     at async Install.exec (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\lib\commands\install.js:152:5)
124 verbose stack     at async module.exports (C:\Users\MY_USER\AppData\Roaming\nvm\v20.11.0\node_modules\npm\lib\cli-entry.js:61:5)
125 verbose cwd C:\Users\MY_USER\MY_PROJECT_PATH
126 verbose Windows_NT 10.0.22631
127 verbose node v20.11.0
128 verbose npm  v10.2.4
129 error code ENOENT
130 error syscall rename
131 error dest C:\Users\MY_USER\MY_PROJECT_PATH\node_modules\.bin\.🚘.ps1-vyTSC4AN
132 error errno -4058
133 error enoent ENOENT: no such file or directory, rename -> 'C:\Users\MY_USER\MY_PROJECT_PATH\node_modules\.bin\.🚘.ps1-vyTSC4AN'
134 error enoent This is related to npm not being able to find a file.
134 error enoent
135 verbose exit -4058
136 timing npm Completed in 2488ms
137 verbose unfinished npm timer command:install 1715001783654
138 verbose unfinished npm timer reify 1715001783656
139 verbose unfinished npm timer reify:retireShallow 1715001785815
140 verbose code -4058
141 error A complete log of this run can be found in: C:\Users\MY_USER\AppData\Local\npm-cache\_logs\2024-05-06T13_23_03_348Z-debug-0.log

What I already tried

  • npm clean cache --force
  • removing node_modules and package-lock.json from my project and reinstall anything
  • copied package.json elsewhere and installed it (did not work)
  • updating npm, nvm and Node.js

Please note

nft.storage actually works fine when installed with yarn add; however, the packet gets added in package.json, blocking everything else that needs being installed afterwards.

@sisittu99 sisittu99 added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels May 6, 2024
@elizabeth-griffiths
Copy link
Member

Thanks for sharing this. Is it blocking you from using NFT.Storage?

@w0nd3r-tribally
Copy link

Hi @elizabeth-griffiths, I'm having the same issue here, and yes it is blocking me from using NFT.Storage at the moment, haven't tried the http API yet tho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

3 participants