node_modules deleting dependency automatically

Discussão em 'Angular' iniciado por user30086062, Abril 7, 2025.

  1. user30086062

    user30086062 Guest

    I'm following an angular project where the start of the project is published at github

    I forked this and made a clone on my local machine (OS windows 11). pre-requisites : install python.

    The guide tells me to run the following commands.

    npm install npm run-script build

    //////////////////////////////it end up with below errors///////////////

    npm error gyp info it worked if it ends with ok
    npm error gyp verb cli [
    npm error gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
    npm error gyp verb cli 'PATH',
    npm error gyp verb cli 'rebuild',
    npm error gyp verb cli '--verbose',
    npm error gyp verb cli '--libsass_ext=',
    npm error gyp verb cli '--libsass_cflags=',
    npm error gyp verb cli '--libsass_ldflags=',
    npm error gyp verb cli '--libsass_library='
    npm error gyp verb cli ]
    npm error gyp info using node-gyp@3.8.0
    npm error gyp info using node@22.14.0 | win32 | x64
    npm error gyp verb command rebuild []
    npm error gyp verb command clean []
    npm error gyp verb clean removing "build" directory
    npm error gyp verb command configure []
    npm error gyp verb check python checking for Python executable "python2" in the PATH
    npm error gyp verb `which` failed Error: not found: python2
    npm error gyp verb `which` failed at
    npm error gyp verb `which` failed at
    npm error gyp verb `which` failed at
    npm error gyp verb `which` failed at
    npm error gyp verb `which` failed at
    npm error gyp verb `which` failed at
    npm error gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
    npm error gyp verb `which` failed python2 Error: not found: python2
    npm error gyp verb `which` failed at getNotFoundError ()
    npm error gyp verb `which` failed at F ()
    npm error gyp verb `which` failed at E ()
    npm error gyp verb `which` failed at C:
    npm error gyp verb `which` failed at C:
    npm error gyp verb `which` failed at C:
    npm error gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
    npm error gyp verb `which` failed code: 'ENOENT'
    npm error gyp verb `which` failed }
    npm error gyp verb check python checking for Python executable "python" in the PATH
    npm error gyp verb `which` failed Error: not found: python
    npm error gyp verb `which` failed at getNotFoundError ()
    npm error gyp verb `which` failed at F ()
    npm error gyp verb `which` failed at E ()
    npm error gyp verb `which` failed at C:\
    npm error gyp verb `which` failed at C:\
    npm error gyp verb `which` failed at C:\
    npm error gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
    npm error gyp verb `which` failed python Error: not found: python
    npm error gyp verb `which` failed at getNotFoundError (C:\)
    npm error gyp verb `which` failed at F (C:9)
    npm error gyp verb `which` failed at E (C:9)
    npm error gyp verb `which` failed at C:
    npm error gyp verb `which` failed at C:
    npm error gyp verb `which` failed at C:
    npm error gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
    npm error gyp verb `which` failed code: 'ENOENT'
    npm error gyp verb `which` failed }
    npm error gyp verb could not find "python". checking python launcher
    npm error (node:14480) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
    npm error (Use `node --trace-deprecation ...` to show where the warning was created)
    npm error gyp verb could not find "python". guessing location
    npm error gyp verb ensuring that file exists: C:\Python27\python.exe
    npm error gyp ERR! configure error
    npm error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
    npm error gyp ERR! stack at PythonFinder.failNoPython (C:)
    npm error gyp ERR! stack at PythonFinder.<anonymous> (C:)
    npm error gyp ERR! stack at callback (C:)
    npm error gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
    npm error gyp ERR! System Windows_NT 10.0.22631
    npm error gyp ERR! command "" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
    npm error gyp ERR! cwd C:
    npm error gyp ERR! node -v v22.14.0
    npm error gyp ERR! node-gyp -v v3.8.0
    npm error gyp ERR! not ok
    npm error Build failed with error code: 1
    npm error A complete log of this run can be found in:


    while I am trying to hit npm install it creates node_modules folder. with all dependency folders but after fully execution of command it end up with empty node_modules. and throwing bunch of errors.

    Continue reading...

Compartilhe esta Página