Encountering a deadly mistake with LNK1181 while attempting to npm install web3

On my Windows system, I attempted to install the web3 node package using npm install. I followed the necessary steps by first installing Windows build tools:

npm install --global --production windows-build-tools

This command executed without issues, but when I proceeded to install web3, an error occurred:

npm WARN deprecated <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1a7c69376a68757773697f5a28342a3429">[email protected]</a>: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a1d5c0d38fc6dbe1908f918f96">[email protected]</a>: ⚠️  WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2053435259505460160e100e13">[email protected]</a> preinstall [project path]\node_modules\scrypt
> node node-scrypt-preinstall.js
> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f58696887f9b8a87889381879bc69589978688">[email protected]</a> install [project path]\node_modules\scrypt
> node-gyp rebuild
[project path]\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
[project path]\node_modules\scrypt\build\..\scrypt\win\include\config.h
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  Copying scrypt/win/include/config.h to scrypt/scrypt-1.2.0/config.h
  The system cannot find the file specified.
  win_delay_load_hook.cc
LINK : fatal error LNK1181: cannot open input file '[user path]\.node-gyp\9.8.0\x64\node.lib' [[project path]\node_modules\scrypt\build\copied_files.vcxproj]
  memlimit.c
  keyderivation.c
  pickparams.c
  hash.c
  win_delay_load_hook.cc
  scrypt_wrapper.vcxproj -> [project path]\node_modules\scrypt\build\Release\\scrypt_wrapper.lib
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258: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.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd [project path]\node_modules\scrypt
gyp ERR! node -v v9.8.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="553c3b373a2d15647b657b65">[email protected]</a> No description
npm WARN <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="660f0804091e265748564856">[email protected]</a> No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fe988d9b889b908a8dbecfd0cfd0cd">[email protected]</a> (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d7b1a4b2a1b2b9a3a497e6f9e6f9e4">[email protected]</a>: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9fecfcede6efebdfa9b1afb1ac">[email= protected]</a> install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="95e6f6e7ece5e1d5a3bba5bba6">[email protected]</a> 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!     [user path]\AppData\Roaming\npm-cache\_logs\2018-03-16T15_29_59_737Z-debug.log

Upon further investigation into the issue during the installation process, it was discovered that the error occurs when attempting to install scrypt. Any ideas on what might be causing this? Additionally, I made sure to set up the required environment variables for Python after setting up the Windows build tools.

Answer №1

To fix this issue, ensure that the project properties path does not contain any spaces or quotation marks.

Answer №2

Oh no, I'm sorry because I can't figure out why it's not working...

I've tried a method that worked for me:

  1. npm install --global --production windows-build-tools
  2. npm install --save [email protected]

It seems like web 3 V 1.0 has been installed correctly now.

If anyone else can offer some help, that would be greatly appreciated!

Answer №3

To resolve the issue, running as root or Administrator may be necessary. I encountered a similar error. I tried following Azerus's suggestion and made a new path using only Latin characters without any spaces (in fact, I simply created a new user and logged in). However, the problem persisted despite my efforts, albeit with a different error code. Then, I had the realization to run cmd as Administrator and... voila, problem solved.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Trigger Screen Reader to Announce When a Component Is Deleted

When the last filter item is removed, I want the screen reader to announce "All Filters Are Removed." However, if the active filter component is removed without any other element to assign an aria-label attribute, I'm not sure how to handle this situa ...

javascript, issues with floating and displaying elements

I am currently working on creating a JavaScript menu that has a click function to smoothly slide up and down. Although the JavaScript code appears to be functioning correctly, it seems that there is some interference with the CSS. Despite attempting vario ...

Steps to show an input button and exit the current window

I am looking for guidance on how to enable or display an input on a webpage if an ajax call is successful. I want this input, when clicked, to be able to close the current window using JavaScript. What would be the most efficient way to accomplish this? B ...

The function of edit does not exist

I'm currently working on creating a discord bot that will send a message to a specific channel upon startup. Initially, I was able to send the message to the designated channel without any issues. However, when I attempted to edit the message, an erro ...

Updating the parent page host within a cross-domain iframe: issues encountered in Firefox and Chrome browsers

I am encountering an issue with my iframe app where I am receiving an alert indicating "-error" in Chrome related to top.location.href. jQuery.ajax({ type : 'get', url : 'check_if_fb_data_set.php', success ...

What is the best way to iterate through an ID using jQuery?

After pulling the list of doctors in my area from the database and displaying it on my webpage, I now want to load each doctor's "About" content inside a Bootstrap modal. I added an "about" column within the same database table where the doctors' ...

What is the process for setting the version in a serverless project?

Recently I downgraded the serverless to version 1.38.0 using the command npm install -g <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="047761767261766861777744352a373c2a34">[email protected]</a>. This triggered in ...

Monitoring variables in AngularJS services

Hey, I'm having some trouble with this issue. I've searched everywhere for a solution, but couldn't find one, despite there being similar questions out there. Basically, I have a class and I only need one instance of it, so I created a serv ...

Is there a way to modify the colors of particles in GPUParticleSystem with Three.js?

I have encountered an issue where I am trying to add black particles in a white THREE.scene. Despite changing the spawn option color, there are still white particles present as if there is a base particle spawn color. The problem arises when I set a white ...

Unable to populate an array with JSON elements within a for loop triggered by useEffect

In my code, there is an issue with the array candleRealTimeDataQueue not updating correctly. Below is the snippet of the problematic code: let candleCurrentJSONDataWS = null; var candleRealTimeDataQueue = []; let tempDateTime = null; let ca ...

Challenges with Tab navigation in React and Ionic 5

I am facing a challenge with getting the tabs navigation to function correctly. Here is my current code: App.tsx: const App: React.FC = () => <IonApp> <IonReactRouter> <IonRouterOutlet id="main"> < ...

Monitor a nested watch property for potential undefined or default values

Currently tackling an issue in my Vue2 project related to a specific property I'm trying to watch. Here's what the code snippet looks like: watch: { 'car.wheels': function(){ ... } Sometimes, 'wheels' is undefined ...

turn off redundant div wrapper in React

Is there a way to remove the extra div wrapper in React when using ES2015? This additional wrapper is causing issues with centering my component in C#. #First div .default-content { margin-right: auto; margin-left: auto; padding: 16px 16px 16 ...

Having trouble installing gatsby-plugin-transition-link using npm

https://i.stack.imgur.com/DyZxQ.png I'm facing some issues while trying to install gatsby-plugin-transition-link using npm. No matter what solutions I've attempted, the errors persist. Can anyone provide insight into what might be causing this p ...

Utilize jQuery function within an HTML form

I am trying to integrate my jQuery function with an HTML tag for my login form that connects to an Azure database. I want a modal pop-up to appear when the client presses the Login button, displaying a specific message based on whether the user is in the d ...

Here's a guide on accessing information from a local JSON file and displaying it on an HTML page using Ionic 2 with TypeScript

I have received a JSON file formatted like the following: { "records": { "patients": { "day": "Today", "details": [ { "name":"Diab", "stat":"Pending", "phno":"8197246465", "patNames":"Sandr ...

What is causing the slight space between the navbar and the edges of my webpage?

tiny opening Here is the HTML and CSS code snippet: body { background-color: green; } .navbar { overflow: hidden; background-color: #333; text-align: center; width: 100%; } .navbar a { float: left; font-size: 18px; color: white; tex ...

What is the best way to arrange this script?

I am currently working on a Javascript script that automatically scrolls down and loads a new URL when it reaches the bottom of the page. However, I would like to add a delay of 30 seconds before the new URL is loaded. Although I am relatively new to Java ...

I am in need of a efficient loader for a slow-loading page on my website. Any recommendations on where to find one that works

I'm experiencing slow loading times on my website and I'm looking to implement a loader that will hide the page until all elements are fully loaded. I've tested several loaders, but they all seem to briefly display the page before the loader ...

Jest's expect method fails to capture errors thrown by async/await functions

I'm currently experimenting with a TypeScript-Express application that utilizes MongoDB and Mongoose. To perform testing, I have integrated jest and mongo-memory-server into the project. While I have succeeded in testing the insertion of new documents ...