-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
ERROR Template execution failed: TypeError: Cannot read property 'entry' of undefined #1492
Comments
As a temporary workaround, I've added an empty |
do you have any changes in |
No, I don't... I've added an empty file to "override" the default template here |
by any chance is your repo public? |
Sorry, it isn't.. But I can share the |
I had the same problem. Short explanation is that In this exact example the problem is that you are defining multiple custom entry chunks, and Preact is expecting only The application I'm working on has a few public pages and an app that has a few more pages, and I wanted to separate them to have service worker only for non public pages and to have a smaller main bundle for public pages. My solution was:
Note that I'm not sure if this is an optimal solution at this point and I hope there will be a simpler solution after #1108. |
hiii @bojan88 ! I know it's been a while since you posted this but I was hoping you could explain this step..
Did you have an example of how you changed the entry? I'm running into this same issue but can't figure it out :( any help would be appreciated, thank youu!! |
The lack of a perma-link here is what throws this off. Here's the actual line you'd want to alter: preact-cli/packages/cli/lib/lib/entry.js Line 32 in 6aba5d8
preact-cli/packages/cli/lib/lib/webpack/webpack-base-config.js Lines 141 to 143 in 6aba5d8
It can be replace with anything, however. As a maintainer I wouldn't necessarily recommend this, but it's how you could provide a secondary entry point. |
Hii thanks so much for the quick reply!! I think I figured out how to do what I wanted to do without messing with the entry file or changing the alias here. |
Do you want to request a feature or report a bug?
Maybe a bug...
What is the current behaviour?
After upgrading
preact-cli
to v3.0.4 I'm getting the error below, after runningpreact build
If the current behaviour is a bug, please provide the steps to reproduce.
After adding the same changes of #1490 in my local
node_modules
preact-cli
installation to be able to pass--no-prerender
option properly, I've executed:What is the expected behaviour?
Apparently it's building the code properly but, since the build script exists with code
1
, it breaks CI the workflow..(Also, it's generating a new file called
200.html
)Please mention other relevant information.
Opening the
200.html
file it prints out the html below:cat /var/folders/40/hmnm06wd6dv_q5pklkjdh5dc0000gn/T/preact-cli/template.tmp.ejs
Click to expand
I'm not using a custom template so, I think it's related to the bump of
ejs-loader
from 0.37 to 0.5.0 in PR #1403Please paste the results of
preact info
here.The text was updated successfully, but these errors were encountered: