1

I was struggling with this problem for couple days, who know how to fix that ? Win7

C:\Users\Administrator>npm install web3
    npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Suppor
    t
    npm WARN deprecated [email protected]: ⚠️  WARNING ⚠️ tar.gz module has been deprecat
    ed and your application is vulnerable. Please use tar module instead: https://np
    mjs.com/tar

    > [email protected] preinstall C:\Users\Administrator\node_modules\scrypt
    > node node-scrypt-preinstall.js


    > [email protected] install C:\Users\Administrator\node_modules\scrypt
    > node-gyp rebuild


    C:\Users\Administrator\node_modules\scrypt>if not defined npm_config_node_gyp (n
    ode "C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\np
    m-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )
      else (node "C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_m
    odules\node-gyp\bin\node-gyp.js" rebuild )
    Warning: Missing input files:
    C:\Users\Administrator\node_modules\scrypt\build\..\scrypt\win\include\config.h
    Generate one project at a time in this solution. To enable parallel generation, add the "/m" switch.
      Copying scrypt/win/include/config.h to scrypt/scrypt-1.2.0/config.h
      The system can not find the file specified.
      win_delay_load_hook.cc
    LINK : fatal error LNK1117: syntax error in option 'LTCG:INCREMENTAL' [C:\Users
    \Administrator\node_modules\scrypt\build\copied_files.vcxproj]
      memlimit.c
      keyderivation.c
      pickparams.c
      hash.c
      win_delay_load_hook.cc
      scrypt_wrapper.vcxproj -> C:\Users\Administrator\node_modules\scrypt\build\Re
      lease\\scrypt_wrapper.lib
    gyp ERR! build error
    gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
    ed with exit code: 1
    gyp ERR! stack     at ChildProcess.onExit (C:\Users\Administrator\AppData\Roamin
    g\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_proces
    s.js:240:12)
    gyp ERR! System Windows_NT 6.1.7601
    gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator
    \\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gy
    p.js" "rebuild"
    gyp ERR! cwd C:\Users\Administrator\node_modules\scrypt
    gyp ERR! node -v v10.13.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok
    npm WARN [email protected] requires a peer of react@>=0.14.0 but none is in
    stalled. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react@^0.14.9 || >=15.3.0 but
     none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react-dom@^0.14.9 || >=15.3.0
     but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react@^0.14.9 || >=15.3.0 but n
    one is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react-dom@^0.14.9 || >=15.3.0 b
    ut none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react@>=0.14.0 but none is in
    stalled. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react@>=15.0.0 but none
     is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react-dom@>=15.0.0 but
    none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react@>=15.0.0 but none is inst
    alled. You must install peer dependencies yourself.
    npm WARN [email protected] No description
    npm WARN [email protected] No repository field.

    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is probably not a problem with npm. There is likely additional log
    ging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-12-09T1
    6_16_09_054Z-debug.log
2
  • Did you install windows build tools?
    – ivicaa
    Commented Dec 9, 2018 at 22:42
  • yes i did @ivicaa
    – Stanley
    Commented Dec 10, 2018 at 4:07

1 Answer 1

0

This error took me long time of reaserch, but now finnaly i solved that, will share the steps if someone needs:
1)First reinstall your node version to 8.11.3, i found out that this is currently the most stable version.
2)Then install windows-build-tools by typing in cmd

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

While downloading windows-build-tools i had another error such as

spawn powershell.exe enoent

Just find your WindowsPowerShell path and add it to System Variable

C:\Windows\System32\WindowsPowerShell\v1.0

re-open the console and try to install windows-build-tools again, if it still doesn't work delete your .node-gyp file and reinstall node-gyp. After that you can easily install all WinTools
[3] These steps basically solved my initial question, and now i'm able to install web3. Of course besides these dependencies you also need to install other dependencies such as Git and Python(2.7.14-recomended version),but i did it yet before

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.