GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Node-module "path" throws an exception when context is missing · Issue #21 · webpack/webpack

Node-module "path" throws an exception when context is missing #21

New issue
Copy link
New issue
Copy link
Closed
Closed
Node-module "path" throws an exception when context is missing#21
Copy link

Description

@jhnns
jhnns
opened on Aug 18, 2012
Issue body actions

The node-module path uses process.cwd() several times, but process.cwd() doesn't seem to be a function in the browser when I haven't passed a context via the options. Imho webpack should always assume a context when no one has been specified, maybe process.cwd().

Activity

  1. sokra commented on Aug 23, 2012

    @sokra
    sokra
    on Aug 23, 2012
    Member
    More actions

    process.cwd() was used to return "/app" in a webpack bundle. Webpack will not use the context provided while bundling. By design webpack should not expose path info.

    The path module uses process.cwd() in resolve(). process.cwd() will now return the directory from window.location.

  2. sokra
    added a commit that references this issue on Aug 23, 2012

    process.cwd() will return dirname of location.pathname, #21

    95fca26
  3. jhnns commented on Sep 7, 2012

    @jhnns
    jhnns
    on Sep 7, 2012
    ContributorAuthor
    More actions

    Ok ... I'm thinking of a use case where some one would work with process.cwd() in the browser. But since all real paths are removed I think there is none. So this is just a shim so the path-module won't break.

  4. sokra commented on Sep 8, 2012

    @sokra
    sokra
    on Sep 8, 2012
    Member
    More actions

    so i close this issue...

  5. sokra
    closed this as completedon Sep 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.