Comments (29)
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.
Fixed in https://github.com/webpack/enhanced-resolve/releases/tag/v3.4.1
from enhanced-resolve.
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.
Just wanted to report the same issue.
from enhanced-resolve.
Also getting this issue.
from enhanced-resolve.
Getting the same problem using version 3.4.0
from enhanced-resolve.
+1
from enhanced-resolve.
+1
from enhanced-resolve.
+1
from enhanced-resolve.
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.
Same issue, had to downgrade again.
Seems to work in 3.2.0.
from enhanced-resolve.
It even works in 3.3.0 @the-architect
from enhanced-resolve.
+1
from enhanced-resolve.
+1
from enhanced-resolve.
@smares yeah sorry, yarn was still installing 3.4.0.
from enhanced-resolve.
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.
+1
from enhanced-resolve.
+1
from enhanced-resolve.
+1
from enhanced-resolve.
+1
from enhanced-resolve.
+1
from enhanced-resolve.
+1
from enhanced-resolve.
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.
@daohoangson's fix works for me right now
from enhanced-resolve.
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.
@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.
@emaincourt that's weird, but ok. thank you. :)
from enhanced-resolve.
Works for me, thanks for fixing!
from enhanced-resolve.
@tomasztomys Because of that comment: #97 (comment)
There is a new release which is fixing this issue.
from enhanced-resolve.
Related Issues (20)
- virtual module not found error HOT 1
- add type defines for `CachedInputFileSystem` ? HOT 5
- CachedInputFileSystem OOM when duration is infinity HOT 5
- signature of method `stat` in interface `FileSystem` mismatches. HOT 2
- bug: exports map key with star in the middle doesn't work HOT 1
- is this possible with webpack AliasPlugin to automatically switch to a different alias when original file is deleted? HOT 7
- can't resolve exports pattern startsWith wildcards HOT 1
- Use of `extensionAlias` fails resolution of subpath exports in `exports` fields HOT 2
- resolving packages entrypoints with a non-standard node_modules HOT 4
- `exports.types` after `exports.default` HOT 5
- Hooks do not fire events from CSS/SCSS imports HOT 6
- AliasPlugin crash when file is deleted or rename (have to restart to make it work)
- Seeing "Error: No file content" for different package.json files when webpack rebuilds HOT 1
- ESM: Resolving to the wrong package with `exports` and nested same package but different versions HOT 3
- ESM: package.exports array target not conforming to the ESM specification HOT 10
- Add ability to handle win32 relative paths HOT 4
- [Feature Request]: Support resolve the modules with hard-links HOT 4
- lstat error when requiring virtual modules HOT 1
- Can i use withOptions Api ? HOT 1
- File Extension Substitution for TypeScript Support HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enhanced-resolve.