Skip to content

Error: Cannot find module node-gyp #1633

@Catutigernos

Description

@Catutigernos

Node v10.14.2, NPM 6.5.0
Windows 10

Hi,
Whenever I called node-gyp, I got same error message.

  • node-gyp
    Error: Cannot find module C:\Users\Asus\AppData\Roaming\npm\node_modules\npm\node_modules\node_modules\node-gyp\bin\node-gyp.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:282:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

İssue is module path is wrong. I check paths
Correct Path:
"C:\Users\Asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js"
Wrong Path:
"C:\Users\Asus\AppData\Roaming\npm\node_modules\npm\node_modules\node_modules\node-gyp\bin\node-gyp.js"

under node_modules directory there is no another node_modules directory and I check .cmd file it has same path structure with other modules, but system generate wrong path, so it cannot find the module. I see I am not alone, many people has same problem on Windows. Is the module tested on Windows? Because I am sure about I read the installation instructions carefully. I set all configuration variables and installed windows-build-tools successfully

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions