-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
TypeError: Cannot read property 'startsWith' of undefined... #445
Comments
Hi @Rikijs, This is probably related to this issue in friendly-errors-webpack-plugin (used in Encore to format errors): geowarin/friendly-errors-webpack-plugin#79 A PR was opened for it a while ago, maybe we could try to patch that on our side while we wait for it to be merged. Anyway, from what I understand it's probably related to an import that contains an invalid path... maybe you could try commenting some of your entrypoints or the |
Maybe we can try to bump the PR forward. We could take their commit, add a test, open a new PR |
Hello @Lyrkan and @weaverryan I managed to find out the source of the problem i was having! Though, the error message sure could be more descriptive in this case. EDIT Thanks. |
See geowarin/friendly-errors-webpack-plugin#82 - I tried to push it along ;) |
Also got this by forgetting to first install some asset modules on a new ci build. A clear error message would definitly help :) |
…ath (Lyrkan) This PR was squashed before being merged into the master branch (closes #456). Discussion ---------- Display a warning when calling "copyFiles" with an invalid path This PR adds a warning when `copyFiles()` is called with a `from` value that isn't an existing directory. This is kind of related to #445 but even if the friendly-errors-webpack-plugin worked properly in this case the origin of the error would probably not be obvious (it'd most likely contain a reference to the temporary entry). Commits ------- 5161d30 Display a different warning when trying to copy from an unexisting directory or an invalid one 8cb9d4a Display a warning when calling "copyFiles" with an invalid path
One of your paths must be invalid somewhere. Just had the same issue. Me, I was trying to import images from the |
If you're using npm Either run:
or add this to your package.json: "friendly-errors-webpack-plugin": "npm:@soda/friendly-errors-webpack-plugin@^1.7.1" This fork is used by |
Same issue when I use Encore.addAliases({
'~': path.join(__dirname, './resources/js'),
}) |
This PR was merged into the master branch. Discussion ---------- Update friendly-errors-webpack-plugin to ^2.0.0-beta.1 A version `^2.0.0-beta.1` of `friendly-webpack-plugin` was released recently, the API doesn't seem to change at all and it fixes a bunch of things, including #445. The major version bump is only there because they dropped support for Webpack 3, which shouldn't impact us at all. Commits ------- 5740369 Update friendly-errors-webpack-plugin to ^2.0.0-beta.1
Should be fixed by #590 |
Hey Guys, I have found the issue, you are not passing the auth details that's why these error you are getting. Try to pass auth, still you get error just drop you message here |
@rajeshrajesh35 AFAIK this error was triggered by an invalid import and was hiding the real error message. I'd guess that your issue was an entirely different thing. |
Hello!
I embarked on the journey to upgrade to
Encore v0.21.0
. I followed instructions (at https://symfony.com/blog/encore-0-21-0-webpack-4-support-copy-files-support-webpackencorebundle) closely. Yet i get this error and i can not figure out the problem.Actually, this is second project that i am updating to
Encore v0.21.0
and the first one works without a hitch. I compared configurations and can not see what could be wrong.I tried deleting
node_modules
and rerunningyarn install
but the problem persists.What may the source of the problem be?
Please advise.
Thank you!
The text was updated successfully, but these errors were encountered: