Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

npm install succeeds on latest version of Node on Windows but does show errors #3033

Closed
devedse opened this issue Aug 16, 2019 · 4 comments
Closed
Assignees
Labels
1.x 1.0 related issues Bug Addressing a bug

Comments

@devedse
Copy link

devedse commented Aug 16, 2019

Description

When I try to create a solution and install web3js using the following command, everything seems to succeed but when you check the logs there's quite some errors when the node-gyp rebuild is happening:

npm install web3 --save-dev

Expected behavior

No errors when doing an NPM install.

Actual behavior

I've created a package.json with the following content:

{
  "name": "nodegyperror",
  "version": "0.1.0",
  "private": true,
  "scripts": {},
  "dependencies": {},
  "devDependencies": {
    "web3": "^1.2.1"
  }
}

Running npm install shows the following red text:
image

The command still returns succeeded though.

Steps to reproduce the behavior

I created a repository with builds to reproduce the issue:
https://github.com/devedse/NodeGypBufferUtilErrors

Windows build and linux builds can be found in the Readme.md on the main page of the repository

Error Logs

Windows build (Errors shown):
https://ci.appveyor.com/project/devedse/nodegypbufferutilerrors

Linux build (No errors shown):
https://travis-ci.org/devedse/NodeGypBufferUtilErrors

Versions

  • web3.js: ^1.2.1
  • nodejs: v12.8.1
  • NPM: v6.10.2
  • browser: N/A
  • ethereum node: N/A
@nivida nivida added 1.x 1.0 related issues Bug Addressing a bug labels Aug 16, 2019
@devedse
Copy link
Author

devedse commented Aug 16, 2019

@nivida , I'm not sure if it's related, but I also see that if I try to install web3@next (to be able to make use of TypeScript bindings) in my current repository it also fails on some Node-gyp related things:

image

Shall I make a seperate issue for this or leave it here?

@michaelsbradleyjr
Copy link
Contributor

@devedse I believe you can solve this problem by installing the windows-build-tools package. Note that it should be installed from a cmd shell run as administrator, but there are instructions for installing as a non-administrator if that's what you need to do.

With the build tools installed, I have no problems installing [email protected] on Windows 10.

@devedse
Copy link
Author

devedse commented Aug 23, 2019

@michaelsbradleyjr , I'll try this out and will let you know if this fixes the issues.

@nivida
Copy link
Contributor

nivida commented Oct 23, 2019

Duplication of #3151.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.x 1.0 related issues Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

3 participants