Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Package including other binding.gyp files fails to build on native Windows with "No such file or directory" for binding.sln.gyp.9gyrmwpe.tmp

Abierto
#3,040 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
node.js, python

Línea de trabajo

Reproduzca el fallo con node-gyp rebuild en Windows nativo utilizando un binding.gyp que incluya archivos binding.gyp anidados. Empiece siguiendo el manejo de las rutas de salida en gyp/pylib/gyp/generator/msvs.py y gyp/pylib/gyp/MSVSNew.py; después, inspeccione la creación de archivos temporales en gyp/pylib/gyp/common.py. Se considera terminado cuando los archivos de solución generados se pueden escribir correctamente sin el error de directorio inexistente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

My package @dodona/dolos-parsers fails to build on Windows with the following error:

npm ERR! FileNotFoundError: [Errno 2] No such file or directory: 'C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules\\@dodona\\dolos-parsers\\build\\bash\\binding.sln.gyp.9gyrmwpe.tmp'

This could be caused by how dolos-parsers is structured: it has a binding.gyp that includes other gyp-files of native modules includes as a submodule in our Git repository:

{
    "includes": [
        "bash/binding.gyp",
        "c/binding.gyp",
        ...
    ]
}

By digging through the msvs.py generator I see there are some issues with generating the sln-files within directories, so maybe that is related?

Verbose output (from npm or node-gyp):

From this GH actions run:

npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules\\tree-sitter',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\npm\prefix\node_modules\@dodona\dolos\node_modules\tree-sitter'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules\\tree-sitter'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\npm\prefix\node_modules\@dodona\dolos\node_modules\tree-sitter'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules\\tree-sitter'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\npm\\prefix\\node_modules\\@dodona\\dolos',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\npm\prefix\node_modules\@dodona\dolos\node_modules\tree-sitter'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules\\tree-sitter'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\npm\\prefix\\node_modules\\@dodona',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\npm\prefix\node_modules\@dodona\dolos\node_modules\tree-sitter'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules\\tree-sitter'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\npm\prefix\node_modules\@dodona\dolos\node_modules\@dodona\dolos-parsers
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@21.7.2 | win32 | x64
npm ERR! gyp info find Python using Python version 3.12.2 found at "C:\hostedtoolcache\windows\Python\3.12.2\x64\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v21.7.2/node-v21.7.2-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v21.7.2/node-v21.7.2-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v21.7.2/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v21.7.2/win-x64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v21.7.2/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v21.7.2/win-x64/node.lib
npm ERR! gyp info find VS using VS2022 (17.9.34723.18) found at:
npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\hostedtoolcache\windows\Python\3.12.2\x64\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\hostedtoolcache\\windows\\node\\21.7.2\\x64\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules\\@dodona\\dolos-parsers\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\hostedtoolcache\\windows\\node\\21.7.2\\x64\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\runneradmin\\AppData\\Local\\node-gyp\\Cache\\21.7.2\\include\\node\\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\runneradmin\\AppData\\Local\\node-gyp\\Cache\\21.7.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\hostedtoolcache\\windows\\node\\21.7.2\\x64\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\runneradmin\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\21.7.2\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules\\@dodona\\dolos-parsers',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules\\@dodona\\dolos-parsers\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR!   File "C:\hostedtoolcache\windows\node\21.7.2\x64\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 45, in <module>
npm ERR!     sys.exit(gyp.script_main())
npm ERR!              ^^^^^^^^^^^^^^^^^
npm ERR!   File "C:\hostedtoolcache\windows\node\21.7.2\x64\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 688, in script_main
npm ERR!     return main(sys.argv[1:])
npm ERR!            ^^^^^^^^^^^^^^^^^^
npm ERR!   File "C:\hostedtoolcache\windows\node\21.7.2\x64\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 680, in main
npm ERR!     return gyp_main(args)
npm ERR!            ^^^^^^^^^^^^^^
npm ERR!   File "C:\hostedtoolcache\windows\node\21.7.2\x64\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 665, in gyp_main
npm ERR!     generator.GenerateOutput(flat_list, targets, data, params)
npm ERR!   File "C:\hostedtoolcache\windows\node\21.7.2\x64\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2157, in GenerateOutput
npm ERR!     sln = MSVSNew.MSVSSolution(
npm ERR!           ^^^^^^^^^^^^^^^^^^^^^
npm ERR!   File "C:\hostedtoolcache\windows\node\21.7.2\x64\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSNew.py", line 228, in __init__
npm ERR!     self.Write()
npm ERR!   File "C:\hostedtoolcache\windows\node\21.7.2\x64\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSNew.py", line 255, in Write
npm ERR!     f = writer(self.path)
npm ERR!         ^^^^^^^^^^^^^^^^^
npm ERR!   File "C:\hostedtoolcache\windows\node\21.7.2\x64\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\common.py", line 415, in WriteOnDiff
npm ERR!     return Writer()
npm ERR!            ^^^^^^^^
npm ERR!   File "C:\hostedtoolcache\windows\node\21.7.2\x64\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\common.py", line 353, in __init__
npm ERR!     tmp_fd, self.tmp_path = tempfile.mkstemp(
npm ERR!                             ^^^^^^^^^^^^^^^^^
npm ERR!   File "C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\tempfile.py", line 357, in mkstemp
npm ERR!     return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
npm ERR!            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR!   File "C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\tempfile.py", line 256, in _mkstemp_inner
npm ERR!     fd = _os.open(file, flags, 0o600)
npm ERR!          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! FileNotFoundError: [Errno 2] No such file or directory: 'C:\\npm\\prefix\\node_modules\\@dodona\\dolos\\node_modules\\@dodona\\dolos-parsers\\build\\bash\\binding.sln.gyp.9gyrmwpe.tmp'
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (C:\hostedtoolcache\windows\node\21.7.2\x64\node_modules\npm\node_modules\node-gyp\lib\configure.js:271:18)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Windows_NT 10.0.20348
npm ERR! gyp ERR! command "C:\\hostedtoolcache\\windows\\node\\21.7.2\\x64\\node.exe" "C:\\hostedtoolcache\\windows\\node\\21.7.2\\x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\npm\prefix\node_modules\@dodona\dolos\node_modules\@dodona\dolos-parsers
npm ERR! gyp ERR! node -v v21.7.2
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: C:\npm\cache\_logs\2024-04-10T12_56_36_832Z-debug-0.log
node:internal/modules/cjs/loader:1145
  throw err;
  ^

Error: Cannot find module 'C:\npm\prefix\node_modules\@dodona\dolos\dist\cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1142:15)
    at Module._load (node:internal/modules/cjs/loader:983:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
Lenguaje dominante
Python
Estrellas
10.7k
Forks
1.9k
Merge medio
1 d 4 h
PR fusionados (30 d)
5

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nodejs/node-gyp

Todos los issues de nodejs/node-gyp

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.