Closed eloudsa closed 7 years ago
Same problem with beta12 and after npm cache verify or nvm cache clear
hm, the package name is in the package.json, do you have any idea what it could be? works for me.
Hi @frozeman I have no idea why this problem happened. I've just tried with web3 beta13 and still the same issue. It works fine when I install it locally but not globally.
Here below the output from my console:
$ npm list g --depth=0 /Users/eloudsa └── (empty)
$ npm cache verify Cache verified and compressed (~/.npm/_cacache): Content verified: 1030 (26233233 bytes) Content garbage-collected: 4 (20891 bytes) Index entries: 1576 Finished in 2.799s
$ npm install -g web3
web3@1.0.0-beta.13 postinstall /usr/local/lib/node_modules/web3 lerna bootstrap
lerna info version 2.0.0 lerna info Bootstrapping 19 packages lerna info lifecycle preinstall lerna info Installing external dependencies lerna ERR! execute Error: Command failed: npm install lerna ERR! execute npm ERR! Can't install /usr/local/lib/node_modules/web3/packages/web3-eth-iban: Missing package name ... ... ...
Very similar to what is happening to me.
I'm having similar issues running Windows 10. I have tried npm installl -g lerna and the windows build tools as suggested in another issue, which were successful but made no change to my npm install web3, globally or not. I have also tried changing my config prefix. FWIW this is my first time using node. `C:\htdocs\project>npm install -g web3
web3@1.0.0-beta.13 postinstall C:\node\node_modules\web3 lerna bootstrap
lerna info version 2.0.0
lerna info Bootstrapping 19 packages
lerna info lifecycle preinstall
lerna info Installing external dependencies
lerna ERR! execute Error: Command failed: npm install
lerna ERR! execute
lerna ERR! execute ┌───────────────────────────────────────────────────────────┐
lerna ERR! execute │ npm update check failed │
lerna ERR! execute │ Try running with sudo or get access │
lerna ERR! execute │ to the local update config store via │
lerna ERR! execute │ sudo chown -R $USER:$(id -gn $USER) C:\Users\root.config │
lerna ERR! execute └───────────────────────────────────────────────────────────┘
lerna ERR! execute npm ERR! Can't install C:\node\node_modules\web3\packages\web3-eth-iban: Missing package name
lerna ERR! execute
lerna ERR! execute npm ERR! A complete log of this run can be found in:
lerna ERR! execute npm ERR! C:\Users\root\AppData\Roaming\npm-cache_logs\2017-07-29T09_12_58_135Z-debug.log
lerna ERR! execute
lerna ERR! execute at Promise.all.then.arr (C:\node\node_modules\web3\node_modules\execa\index.js:210:11)
lerna ERR! execute at
┌───────────────────────────────────────────────────────────┐ │ npm update check failed │ │ Try running with sudo or get access │ │ to the local update config store via │ │ sudo chown -R $USER:$(id -gn $USER) C:\Users\root.config │ └───────────────────────────────────────────────────────────┘ npm ERR! Can't install C:\node\node_modules\web3\packages\web3-eth-iban: Missing package name
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\root\AppData\Roaming\npm-cache_logs\2017-07-29T09_12_58_135Z-debug.log
(node:6252) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:6252) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: Command failed: npm install npm ERR! Can't install C:\node\node_modules\web3\packages\web3-bzz: Missing package name
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\root\AppData\Roaming\npm-cache_logs\2017-07-29T09_12_58_134Z-debug.log
(node:6252) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 9): Error: Command failed: npm install npm ERR! Can't install C:\node\node_modules\web3\packages\web3-utils: Missing package name
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\root\AppData\Roaming\npm-cache_logs\2017-07-29T09_12_58_208Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! web3@1.0.0-beta.13 postinstall: lerna bootstrap
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the web3@1.0.0-beta.13 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\root\AppData\Roaming\npm-cache_logs\2017-07-29T09_13_01_614Z-debug.log`
@1337cookie try installing v0.20.0 or downgrading node to v6:
$npm install web3@^0.20.0
or
$nvm install v6
$npm install web3
@Ranguna Thanks, that works :)
Thanks, @Ranguna but that means we are not on the latest version right? Any fixes to get the latest version running after all?
If anything depends on node v6 i would like to fix that, it should work on all. @Ranguna why you are installing globally?
Thanks @Ranguna, npm install -g web3@^0.20.0 worked for me, too!
@frozeman, I was helping @1337cookie and he was installing globally. I'll edit that to local install for other people that come here with the same problem.
Ok please re-open if its still an issue
same problem for me! I have tried to install $npm install web3@^0.20.0 and it works
same problem for me! I have tried to install $npm install web3@^0.20.0 and it works
$npm install web3@^0.20.0
This also did the job for me.
With node 8.4.0 and npm 5.4.2
npm -g i web3
outputs the error:
> web3@1.0.0-beta.18 postinstall /home/user/.nvm/versions/node/v8.4.0/lib/node_modules/web3
> lerna bootstrap
lerna info version 2.1.2
lerna info Bootstrapping 19 packages
lerna info lifecycle preinstall
lerna info Installing external dependencies
lerna ERR! execute Error: Command failed: npm install
lerna ERR! execute npm ERR! Can't install /home/user/.nvm/versions/node/v8.4.0/lib/node_modules/web3/packages/web3-bzz: Missing package name
lerna ERR! execute
lerna ERR! execute npm ERR! A complete log of this run can be found in:
lerna ERR! execute npm ERR! /home/user/.npm/_logs/2017-09-15T10_55_34_700Z-debug.log
lerna ERR! execute
lerna ERR! execute at Promise.all.then.arr (/home/user/.nvm/versions/node/v8.4.0/lib/node_modules/web3/node_modules/execa/index.js:236:11)
lerna ERR! execute at <anonymous>
lerna ERR! execute at process._tickCallback (internal/process/next_tick.js:188:7)
lerna ERR! execute callback with error
lerna ERR! execute { Error: Command failed: npm install
lerna ERR! execute npm ERR! Can't install /home/user/.nvm/versions/node/v8.4.0/lib/node_modules/web3/packages/web3-bzz: Missing package name
lerna ERR! execute
lerna ERR! execute npm ERR! A complete log of this run can be found in:
lerna ERR! execute npm ERR! /home/user/.npm/_logs/2017-09-15T10_55_34_700Z-debug.log
lerna ERR! execute
lerna ERR! execute at Promise.all.then.arr (/home/user/.nvm/versions/node/v8.4.0/lib/node_modules/web3/node_modules/execa/index.js:236:11)
lerna ERR! execute at <anonymous>
lerna ERR! execute at process._tickCallback (internal/process/next_tick.js:188:7)
lerna ERR! execute stack: 'Error: Command failed: npm install\nnpm ERR! Can\'t install /home/user/.nvm/versions/node/v8.4.0/lib/node_modules/web3/packages/web3-bzz: Missing package name\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /home/user/.npm/_logs/2017-09-15T10_55_34_700Z-debug.log\n\n at Promise.all.then.arr (/home/user/.nvm/versions/node/v8.4.0/lib/node_modules/web3/node_modules/execa/index.js:236:11)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:188:7)',
lerna ERR! execute code: 1,
lerna ERR! execute killed: false,
lerna ERR! execute stdout: '',
lerna ERR! execute stderr: 'npm ERR! Can\'t install /home/user/.nvm/versions/node/v8.4.0/lib/node_modules/web3/packages/web3-bzz: Missing package name\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /home/user/.npm/_logs/2017-09-15T10_55_34_700Z-debug.log\n',
lerna ERR! execute failed: true,
lerna ERR! execute signal: null,
lerna ERR! execute cmd: 'npm install',
lerna ERR! execute timedOut: false }
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! web3@1.0.0-beta.18 postinstall: `lerna bootstrap`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the web3@1.0.0-beta.18 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2017-09-15T10_55_41_228Z-debug.log
locally the web3 install has no problem:
npm i web3
> web3@1.0.0-beta.18 postinstall /home/user/Downloads/truffle/node_modules/web3
> lerna bootstrap
lerna info version 2.1.2
lerna info Bootstrapping 19 packages
lerna info lifecycle preinstall
lerna info Installing external dependencies
lerna info Symlinking packages and binaries
lerna info lifecycle postinstall
lerna info lifecycle prepublish
lerna info lifecycle prepare
lerna success Bootstrapped 19 packages
npm WARN saveError ENOENT: no such file or directory, open '/home/user/Downloads/truffle/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/user/Downloads/truffle/package.json'
npm WARN truffle No description
npm WARN truffle No repository field.
npm WARN truffle No README data
npm WARN truffle No license field.
+ web3@1.0.0-beta.18
added 275 packages in 76.806s
I'm building a cli that depends on web3...that's why I need web3 to be globally installable.
Many thanks for your help!
I have the same problem installing web3@latest
. Attaching the last lines from npm-debug.log
:
16798 verbose stack Error: scrypt@6.0.3 install: `node-gyp rebuild`
16798 verbose stack Exit status 1
16798 verbose stack at EventEmitter.<anonymous> (/Users/ookie/.nvm/versions/node/v7.7.3/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
16798 verbose stack at emitTwo (events.js:106:13)
16798 verbose stack at EventEmitter.emit (events.js:194:7)
16798 verbose stack at ChildProcess.<anonymous> (/Users/ookie/.nvm/versions/node/v7.7.3/lib/node_modules/npm/lib/utils/spawn.js:40:14)
16798 verbose stack at emitTwo (events.js:106:13)
16798 verbose stack at ChildProcess.emit (events.js:194:7)
16798 verbose stack at maybeClose (internal/child_process.js:899:16)
16798 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
16799 verbose pkgid scrypt@6.0.3
16800 verbose cwd /Users/ookie/Desktop/redacted
16801 error Darwin 16.7.0
16802 error argv "/Users/ookie/.nvm/versions/node/v7.7.3/bin/node" "/Users/ookie/.nvm/versions/node/v7.7.3/bin/npm" "install" "web3@latest"
16803 error node v7.7.3
16804 error npm v4.1.2
16805 error code ELIFECYCLE
16806 error scrypt@6.0.3 install: `node-gyp rebuild`
16806 error Exit status 1
16807 error Failed at the scrypt@6.0.3 install script 'node-gyp rebuild'.
16807 error Make sure you have the latest version of node.js and npm installed.
16807 error If you do, this is most likely a problem with the scrypt package,
16807 error not with npm itself.
16807 error Tell the author that this fails on your system:
16807 error node-gyp rebuild
16807 error You can get information on how to open an issue for this project with:
16807 error npm bugs scrypt
16807 error Or if that isn't available, you can get their info via:
16807 error npm owner ls scrypt
16807 error There is likely additional logging output above.
16808 verbose exit [ 1, true ]
Tried on different projects, machines (two different macOS Sierra 10.12.6), installing globally, locally, updating node-gyp, sacrificing virgins on a full moon night, using multiple Node.js versions (6.x, 7.x, 8.x), and the result is still the same. Tried two Ubuntu machines and it works there.
U can install web3@1.0.0-beta.26 on windows machines
But before installing you have to make the windows dependencies visuall c++ tool by running, npm install --global --production windows-build-tools
after the installation is complete
run npm install --save web3@1.0.0-beta.26
and hurray u have your web3 with the 1.0 version.
Many thanks, worked for me 💯
I keep getting this when I run: npm install --save web3@1.0.0-beta.26
Any ideas?
npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support npm WARN deprecated tar.gz@1.0.7: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar npm ERR! code ENOGIT npm ERR! No git binary found in $PATH npm ERR! npm ERR! Failed using git. npm ERR! Please check if you have git installed and in your PATH.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\dev\AppData\Roaming\npm-cache_logs\2018-04-17T02_28_19_946Z-debug.log
@moosedevelopments Do you have git installed ?
Try this first npm install --global --production windows-build-tools
thanks bro this helped ... greatly appreciated
A very simple solution is to type sudo -i and then sudo npm install web3 It worked for me
Can someone help me out I've tried about 50 times with the different methods and re installs that seem to address my problem but with nothing working. Could someone offer any assistance please?
PS C:\Windows\system32> npm install --save web3@1.0.0-beta.46
scrypt@6.0.3 preinstall C:\Windows\system32\node_modules\scrypt node node-scrypt-preinstall.js
scrypt@6.0.3 install C:\Windows\system32\node_modules\scrypt node-gyp rebuild
C:\Windows\system32\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Users\HOME\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\HOME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
C:\Windows\system32\node_modules\scrypt\build..\scrypt\win\include\config.h
MSBUILD : error MSB1009: Project file does not exist.
Switch: build/binding.sln
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\HOME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:180:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\HOME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Windows\system32\node_modules\scrypt
gyp ERR! node -v v9.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt@6.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\HOME\AppData\Roaming\npm-cache_logs\2019-06-07T03_23_16_623Z-debug.log
I have a similar error when tried to install web3 lib on node v18.15 and I have a problem when installing it gives me that message npm i web3 npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that. npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated multicodec@1.0.4: This module has been superseded by the multiformats module npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated multibase@0.6.1: This module has been superseded by the multiformats module npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module npm WARN deprecated cids@0.7.5: This module has been superseded by the multiformats module
added 334 packages, and audited 335 packages in 57s
52 packages are looking for funding
run npm fund
for details
6 moderate severity vulnerabilities
To address all issues, run: npm audit fix
Run npm audit
for details.
PS D:\fields\web\project2>npm audit fix --force
Will install web3@0.20.7, which is a breaking change
node_modules/request
servify
Depends on vulnerable versions of request
node_modules/servify
eth-lib 0.1.24 - 0.1.29
Depends on vulnerable versions of servify
swarm-js >=0.1.36
Depends on vulnerable versions of eth-lib
node_modules/swarm-js
web3-bzz
Depends on vulnerable versions of swarm-js
node_modules/web3-bzz
web3 1.0.0-beta.1 - 3.0.0-rc.0
Depends on vulnerable versions of web3-bzz
node_modules/web3
6 moderate severity vulnerabilities
To address all issues (including breaking changes), run: npm audit fix --force PS D:\fields\web\project2> npm audit fix --force npm WARN using --force Recommended protections disabled. npm WARN audit Updating web3 to 0.20.7, which is a SemVer major change. npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -4058 npm ERR! enoent An unknown git error occurred npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
Hi
I'm using node 8.2.1 and npm 5.3.0 on OSX.
I'm not able to install web3 1.0 even after a clean cache.
Did I missed something?