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 fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Suppor
    t
    npm WARN deprecated tar.gz@1.0.7: ⚠️  WARNING ⚠️ tar.gz module has been deprecat
    ed and your application is vulnerable. Please use tar module instead: https://np
    mjs.com/tar

    > scrypt@6.0.3 preinstall C:\Users\Administrator\node_modules\scrypt
    > node node-scrypt-preinstall.js


    > scrypt@6.0.3 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 prop-types-extra@1.1.0 requires a peer of react@>=0.14.0 but none is in
    stalled. You must install peer dependencies yourself.
    npm WARN react-bootstrap@0.32.4 requires a peer of react@^0.14.9 || >=15.3.0 but
     none is installed. You must install peer dependencies yourself.
    npm WARN react-bootstrap@0.32.4 requires a peer of react-dom@^0.14.9 || >=15.3.0
     but none is installed. You must install peer dependencies yourself.
    npm WARN react-overlays@0.8.3 requires a peer of react@^0.14.9 || >=15.3.0 but n
    one is installed. You must install peer dependencies yourself.
    npm WARN react-overlays@0.8.3 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 react-prop-types@0.4.0 requires a peer of react@>=0.14.0 but none is in
    stalled. You must install peer dependencies yourself.
    npm WARN react-transition-group@2.5.0 requires a peer of react@>=15.0.0 but none
     is installed. You must install peer dependencies yourself.
    npm WARN react-transition-group@2.5.0 requires a peer of react-dom@>=15.0.0 but
    none is installed. You must install peer dependencies yourself.
    npm WARN uncontrollable@5.1.0 requires a peer of react@>=15.0.0 but none is inst
    alled. You must install peer dependencies yourself.
    npm WARN administrator@1.0.0 No description
    npm WARN administrator@1.0.0 No repository 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 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
    Dec 9 '18 at 22:42
  • yes i did @ivicaa
    – Stanley
    Dec 10 '18 at 4:07
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, privacy policy and cookie policy

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