Skip to content

Module.globalPaths under Windows #6434

Closed
@qfox

Description

@qfox
  • Version: 4.3—6.0
  • Platform: Windows 32, 64

Looks like code at https://github.com/nodejs/node/blob/master/lib/module.js#L590:

var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];

is Unix specific and since nodejs is installed as c:\program files\nodejs\node.exe the base path resolved to 'C:\\Program Files\\lib\\node', and it's pointless.

Guess this should be fixed to path.resolve(process.env.AppData, 'npm', 'node_modules') for windows, or something similar since right there node_modules are placed by default in win7+.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.moduleIssues and PRs related to the module subsystem.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions