nftstorage / nft.storage

**Notice: Uploads Decommissioned - Existing Data is Safe!** NFT.Storage Classic (classic.nft.storage) offers free decentralized storage and bandwidth for NFTs on IPFS and Filecoin. June 2024 Update: No new uploads, but all existing data is safe. Try the new NFT.Storage, which preserves data in long term Filecoin storage. Go to app.nft.storage
https://classic.nft.storage
Other
619 stars 167 forks source link

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

Open sisittu99 opened 4 months ago

sisittu99 commented 4 months ago

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:

On terminal (Powershell):

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

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.

elizabeth-griffiths commented 4 months ago

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

w0nd3r-tribally commented 3 months ago

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