-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Uncaught TypeError: Cannot read property 'replace' of null #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have the same situation as the OP. I also have a inline script which loads the bundle and I am getting the same error when I upgraded Webpack dev server to |
Same problem, seems a problem with |
I can confirm that it breaks when you have a script with no src tag. This is a showstopper if you have injected js into the html. It breaks on this line: webpack-dev-server/client/index.js Line 11 in 5b94506
1.14.0 works for me too. #372 is a duplicate. |
I'm getting the same error, downgrading to 1.14.0 temporarily as a work around. Assuming the dev server script is the last script on the page seems to be the issue. 3d3c000 |
Same issue happened to me. Downgraded as well, works like a charm with 1.14.0 |
FYI: This is happening when you have a |
I was able to work around this with a hack-ish change: <script>
document.currentScript.src =''; // So that the script executes, but later has a src.
// ... Do rest of work.
</script> |
I also have this issue. The sole
Downgrading to 1.14.0 solved the issue. |
Same problem here because of the Google Tag Manager script in the index.html |
Do not upgrade webpack-dev-server to >=1.14.1 webpack/webpack-dev-server#381
This issue affected us as well. Fixing it required setting webpack-dev-server to |
Same problem with 1.14.0 |
Just to point out for anyone else having the same issue - I have disabled the extension until this issue will be fixed. |
@idoco I can confirm that the popup blocker extension is causing the error for me. Not sure why that is though. |
@adrianmc Yes, I think this is just because the extension injects a script tag with no 'src' attribute to the page which is the real root cause. |
@idoco thanks! My exact issue. Whitelisting the appropriate dev domains solves the issue. |
Also getting this problem with the similar script injections. The solution provided above (downgrading to 1.14.0) works for me. |
I had this error because of a 'defer' attribute in my script tag. |
I had this issue when the variable I used was equal to null. Just added a check to perform .replace if not null, and it works now. Hope this helps someone. |
Dupe of #117. |
just for somebody rush into this issue: i missed there is no correct entry in webpack config file after i git check out other branch the webpack still watch old entry |
faced the same issue. I just clear the cache data, it works. |
yeah |
Hi, with version 1.14.1 I'm receiving this error:
I'm using an inline script in the index.html to load the .JS file (which is in the folder declared by publicPath) and I enabled the hot module replacement to receive updates.
Using version 1.14.0, it works fine (so at the moment I am not updating the webpack-dev-server module to 1.14.1).
The text was updated successfully, but these errors were encountered: