GithubHelp home page GithubHelp logo

Comments (29)

daohoangson avatar daohoangson commented on May 5, 2024 20

Looks like we have an undefined key here, likely from commit 03ef8f2:

		for(var key of this.data.keys()) {
			if(key.startsWith(what))
				this.data.delete(key);
		}

In a rush so I had to edit it like below as a temporary workaround:

		for(var key of this.data.keys()) {
			if (typeof key !== "string") {
				continue;
			}
			if(key.startsWith(what))
				this.data.delete(key);
		}

Hope this can be fixed soon.

from enhanced-resolve.

Alex-Sokolov avatar Alex-Sokolov commented on May 5, 2024 13

Fixed in https://github.com/webpack/enhanced-resolve/releases/tag/v3.4.1

from enhanced-resolve.

emaincourt avatar emaincourt commented on May 5, 2024 2

Downgrading worked for me. If you're using Yarn, think about updating your yarn.lock file when you install 3.3.0 manually :

enhanced-resolve@^3.3.0:
  version "3.3.0"
  resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.3.0.tgz#950964ecc7f0332a42321b673b38dc8ff15535b3"
  dependencies:
    graceful-fs "^4.1.2"
    memory-fs "^0.4.0"
    object-assign "^4.0.1"
    tapable "^0.2.5"

from enhanced-resolve.

smares avatar smares commented on May 5, 2024

Just wanted to report the same issue.

from enhanced-resolve.

peteringram0 avatar peteringram0 commented on May 5, 2024

Also getting this issue.

from enhanced-resolve.

suyi91 avatar suyi91 commented on May 5, 2024

Getting the same problem using version 3.4.0

from enhanced-resolve.

antonnyman avatar antonnyman commented on May 5, 2024

+1

from enhanced-resolve.

MadMikeyB avatar MadMikeyB commented on May 5, 2024

+1

from enhanced-resolve.

Alvin-Liu avatar Alvin-Liu commented on May 5, 2024

+1

from enhanced-resolve.

timbergus avatar timbergus commented on May 5, 2024

Same error here.

webpack: Compiling...
/Users/Gustavo/Desktop/canvas-test/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:145

                    if(key.startsWith(what))
                          ^
TypeError: Cannot read property 'startsWith' of undefined

from enhanced-resolve.

the-architect avatar the-architect commented on May 5, 2024

Same issue, had to downgrade again.
Seems to work in 3.2.0.

from enhanced-resolve.

smares avatar smares commented on May 5, 2024

It even works in 3.3.0 @the-architect

from enhanced-resolve.

timobehrens avatar timobehrens commented on May 5, 2024

+1

from enhanced-resolve.

code-by-gijs avatar code-by-gijs commented on May 5, 2024

+1

from enhanced-resolve.

the-architect avatar the-architect commented on May 5, 2024

@smares yeah sorry, yarn was still installing 3.4.0.

from enhanced-resolve.

jeremyxgo avatar jeremyxgo commented on May 5, 2024

Just facing the same error in 3.3.0
My script: cross-env NODE_ENV=development webpack-dev-server -d --inline --hot
When I edit my code and trigger the hot reload, the error shows and break the dev server

from enhanced-resolve.

bongofury avatar bongofury commented on May 5, 2024

+1

from enhanced-resolve.

Kumarsammy avatar Kumarsammy commented on May 5, 2024

+1

from enhanced-resolve.

tomasztomys avatar tomasztomys commented on May 5, 2024

+1

from enhanced-resolve.

dariuszpaluch avatar dariuszpaluch commented on May 5, 2024

+1

from enhanced-resolve.

3jwddgm avatar 3jwddgm commented on May 5, 2024

+1

from enhanced-resolve.

diegoprd avatar diegoprd commented on May 5, 2024

+1

from enhanced-resolve.

danbruegge avatar danbruegge commented on May 5, 2024

I tried downgrade to v3.3.0 and v3.2.0 with no success. I had to revert my upgrade from webpack-dev-server v2.6.1 back to v2.5.1. Now it is working again.

from enhanced-resolve.

antonnyman avatar antonnyman commented on May 5, 2024

@daohoangson's fix works for me right now

from enhanced-resolve.

the-architect avatar the-architect commented on May 5, 2024

adding "enhanced-resolve": "3.3.0" to your package.json dependencies and running yarn is not enough? I can't try it out, because I deleted the yarn.lock file before.

from enhanced-resolve.

emaincourt avatar emaincourt commented on May 5, 2024

@the-architect No since webpack expects "enhanced-resolve": "^3.3.0" so Yarn will resolve two different packages since patterns are different when you install it. You need to explicitly link them

from enhanced-resolve.

the-architect avatar the-architect commented on May 5, 2024

@emaincourt that's weird, but ok. thank you. :)

from enhanced-resolve.

danrot avatar danrot commented on May 5, 2024

Works for me, thanks for fixing!

from enhanced-resolve.

danrot avatar danrot commented on May 5, 2024

@tomasztomys Because of that comment: #97 (comment)

There is a new release which is fixing this issue.

from enhanced-resolve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.