Skip to content

Error deploying when not prerendering #100

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

Closed
jdgamble555 opened this issue Mar 2, 2024 · 5 comments · Fixed by #101
Closed

Error deploying when not prerendering #100

jdgamble555 opened this issue Mar 2, 2024 · 5 comments · Fixed by #101

Comments

@jdgamble555
Copy link

jdgamble555 commented Mar 2, 2024

Describe the bug
I don't want my front page prerendered, as I could have dynamic content there for SEO. I change prerender to false, and it will not deploy.

To Reproduce
Steps to reproduce the behavior:
Create a new Angular SSR project. Change projects.architect.prerender to false in angular.json. Then connect your Git Repository in Netlify and deploy.

Expected behavior
It should deploy without error.

Versions

  • Angular.js: 17.2
  • plugin (if installed in your package.json at fixed version): n/a - Just connected Git Repository.

Logs

1:59:42 PM: Plugin "@netlify/angular-runtime" internal error              
1:59:42 PM: ────────────────────────────────────────────────────────────────
1:59:42 PM: ​
1:59:42 PM:   Error message
1:59:42 PM:   Error: ENOENT: no such file or directory, open "dist/angular-firebase-deploy/prerendered-routes.json"
1:59:42 PM: ​
1:59:42 PM:   Plugin details
1:59:42 PM:   Package:        @netlify/angular-runtime
1:59:42 PM:   Version:        2.0.5
1:59:42 PM:   Repository:     git+https://github.com/netlify/angular-runtime.git
1:59:42 PM:   npm link:       https://www.npmjs.com/package/@netlify/angular-runtime
1:59:42 PM:   Report issues:  https://github.com/netlify/angular-runtime/issues
1:59:42 PM: ​
1:59:42 PM:   Error location
1:59:42 PM:   In "onBuild" event in "@netlify/angular-runtime" from Netlify app
1:59:42 PM: ​
1:59:42 PM:   Error properties
1:59:42 PM:   {
1:59:42 PM:     errno: -2,
1:59:42 PM:     code: "ENOENT",
1:59:42 PM:     syscall: "open",
1:59:42 PM:     path: "dist/angular-firebase-deploy/prerendered-routes.json"
1:59:42 PM:   }
1:59:42 PM: ​
1:59:42 PM:   Resolved config
1:59:42 PM:   build:
1:59:42 PM:     command: npm run build
1:59:42 PM:     commandOrigin: ui
1:59:42 PM:     publish: /opt/build/repo/dist/angular-firebase-deploy/browser
1:59:42 PM:     publishOrigin: ui
1:59:42 PM:   plugins:
1:59:42 PM:     - inputs: {}
1:59:42 PM:       origin: ui
1:59:42 PM:       package: "@netlify/angular-runtime"
1:59:43 PM: Failed during stage "building site": Build script returned non-zero exit code: 4
1:59:43 PM: Build failed due to an internal system error: Build script returned non-zero exit code: 4
1:59:43 PM: Failing build: Failed to build site
1:59:43 PM: Finished processing build request in 36.601s

J

@Skn0tt
Copy link
Contributor

Skn0tt commented Mar 4, 2024

Thanks for reporting! I'll work on a fix.

@Skn0tt
Copy link
Contributor

Skn0tt commented Mar 4, 2024

Fix released in https://github.com/netlify/angular-runtime/releases/tag/v2.0.6. Let me know if that fixes it for you!

@jdgamble555
Copy link
Author

Still getting the error Error: ENOENT: no such file or directory, open "dist/angular-firebase-deploy/prerendered-routes.json". I'm not installing @angular-runtime, I'm just using the GitHub deploy.

If I set it to this:

"prerender": {
  "discoverRoutes": false
},

it works fine, but I shouldn't have to.

J

Skn0tt added a commit to netlify/plugins that referenced this issue Mar 4, 2024
@Skn0tt Skn0tt reopened this Mar 4, 2024
Skn0tt added a commit to netlify/plugins that referenced this issue Mar 4, 2024
@Skn0tt
Copy link
Contributor

Skn0tt commented Mar 4, 2024

Gotcha! I forgot that I also need to release the new version of the plugin to the Netlify infra, so it's applied to your site. Did that with netlify/plugins#1310. Could you try again?

@jdgamble555
Copy link
Author

Yup, fixed it.

Thanks!

J

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants