Home > other >  v8.h missing from node-gyp
v8.h missing from node-gyp

Time:05-23

I am getting the error above when executing "yarn bootstrap" inside a forked/clones repository from truffle (https://github.com/swisstackle/truffle) . I forked the repo from https://github.com/trufflesuite/truffle

Here is the last logfile:

 0 verbose cli [
    0 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
    0 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
    0 verbose cli   'exec',
    0 verbose cli   '--',
    0 verbose cli   'run',
    0 verbose cli   'rebuild'
    0 verbose cli ]
    1 info using [email protected]
    2 info using [email protected]
    3 timing npm:load:whichnode Completed in 0ms
    4 timing config:load:defaults Completed in 4ms
    5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 4ms
    6 timing config:load:builtin Completed in 4ms
    7 timing config:load:cli Completed in 3ms
    8 timing config:load:env Completed in 7ms
    9 timing config:load:file:C:\Users\alain\Git\truffle\node_modules\ursa-optional\.npmrc Completed in 1ms
    10 timing config:load:project Completed in 3ms
    11 timing config:load:file:C:\Users\alain\.npmrc Completed in 0ms
    12 timing config:load:user Completed in 1ms
    13 timing config:load:file:C:\Users\alain\AppData\Roaming\npm\etc\npmrc Completed in 1ms
    14 timing config:load:global Completed in 1ms
    15 timing config:load:validate Completed in 4ms
    16 timing config:load:credentials Completed in 1ms
    17 timing config:load:setEnvs Completed in 2ms
    18 timing config:load Completed in 32ms
    19 timing npm:load:configload Completed in 33ms
    20 timing npm:load:setTitle Completed in 2ms
    21 timing config:load:flatten Completed in 5ms
    22 timing npm:load:display Completed in 6ms
    23 verbose logfile C:\Users\alain\AppData\Local\npm-cache\_logs\2022-05-20T06_19_01_219Z-debug-0.log
    24 timing npm:load:logFile Completed in 7ms
    25 timing npm:load:timers Completed in 0ms
    26 timing npm:load:configScope Completed in 0ms
    27 timing npm:load Completed in 50ms
    28 silly logfile start cleaning logs, removing 21 files
    29 silly logfile error removing log file C:/Users/alain/AppData/Local/npm-cache/_logs/2022-05-20T05_54_36_838Z-debug-0.log [Error: EPERM: operation not permitted, unlink 'C:\Users\alain\AppData\Local\npm-cache\_logs\2022-05-20T05_54_36_838Z-debug-0.log'] {
    29 silly logfile   errno: -4048,
    29 silly logfile   code: 'EPERM',
    29 silly logfile   syscall: 'unlink',
    29 silly logfile   path: 'C:\\Users\\alain\\AppData\\Local\\npm-cache\\_logs\\2022-05-20T05_54_36_838Z-debug-0.log'
    29 silly logfile }
    30 silly logfile error removing log file C:/Users/alain/AppData/Local/npm-cache/_logs/2022-05-20T05_54_38_424Z-debug-0.log [Error: EPERM: operation not permitted, unlink 'C:\Users\alain\AppData\Local\npm-cache\_logs\2022-05-20T05_54_38_424Z-debug-0.log'] {
    30 silly logfile   errno: -4048,
    30 silly logfile   code: 'EPERM',
    30 silly logfile   syscall: 'unlink',
    30 silly logfile   path: 'C:\\Users\\alain\\AppData\\Local\\npm-cache\\_logs\\2022-05-20T05_54_38_424Z-debug-0.log'
    30 silly logfile }
    31 http fetch GET 200 https://registry.yarnpkg.com/run 265ms (cache revalidated)
    32 timing arborist:ctor Completed in 1ms
    33 timing arborist:ctor Completed in 0ms
    34 timing arborist:ctor Completed in 0ms
    35 silly logfile error removing log file C:/Users/alain/AppData/Local/npm-cache/_logs/2022-05-20T05_54_40_145Z-debug-0.log [Error: EPERM: operation not permitted, unlink 'C:\Users\alain\AppData\Local\npm-cache\_logs\2022-05-20T05_54_40_145Z-debug-0.log'] {
    35 silly logfile   errno: -4048,
    35 silly logfile   code: 'EPERM',
    35 silly logfile   syscall: 'unlink',
    35 silly logfile   path: 'C:\\Users\\alain\\AppData\\Local\\npm-cache\\_logs\\2022-05-20T05_54_40_145Z-debug-0.log'
    35 silly logfile }
    36 timing command:exec Completed in 373ms
    37 verbose exit 1
    38 timing npm Completed in 1242ms
    39 verbose code 1

Ive tried multiple things that are recomended on stack overflow or other websites:

  • install sqlite3 manually. It looks like the earlier in the output in the commandline it says error C:\Users\alain\Git\truffle\node_modules\sqlite3: Command failed.
  • change yarn versions
  • reclone and rerun the whole thing
  • clear the npm cache
  • Install sqlite3 manually: Yarn add sqlite3 -W

Anything else I could try? I am just following the contributions.md tutorial on https://github.com/trufflesuite/truffle/blob/develop/CONTRIBUTING.md

Update: I have made some progress:

Due to the log file, I figured out that the v8.h in node-gyp was missing. I reinstalled node-gyp and that resolved the issue.

The next error that was coming up that the some file in the scripts folder of truffle still had windows white spaces, so I removed them with sed -i 's/\r//g' and that resolved the issue

Then, another issue came up, which I couldnt solve yet: When yarn tries to build the truffle dashboard package, I am getting the error 'DISABLE_ESLINT_PLUGIN' is not recognized as an internal or external command which is used in the package.json to run react-scripts without eslint

According to react-scripts, this tag was added with the version 4.0.2, but the package.json in the dashboard package references version 4.0.0 for react-scripts. This is a little bit confusing to me, because how could the developers at consensys build the dashboard package with this tag, if they use version 4.0.0? I will open up a separate question for that.Pro

CodePudding user response:

The issue was that node-gyp had v8.h missing: I quickly resolved that be reinstalling nodegyp: npm install node-gyp -g

However, there were coming up to more errors afterwards that are unrelated to the original error. More details in the question text that I updated. I will make a seperate question for these errors.

  • Related