Comments (4)
Hi Kirill, is it possible that you're using atob
somewhere in your Angular app or that it's used by one of your dependencies? atob
and btoa
are not available in Node.js.
from angular-prerender.
Yes, I do indeed use atob in one route, but it seems like my options here are limited to excluding a route, right?
from angular-prerender.
You could create a little helper which uses the API of the current platform.
import { PLATFORM_ID } from '@angular/core';
import { isPlatformBrowser } from '@angular/common';
export class Base64Service {
constructor(private @Inject(PLATFORM_ID) platformId: Object) { }
public atob(value: string): string {
return isPlatformBrowser(platformId)
? atob(value)
: Buffer.from(value).toString('base64');
}
}
Or you replace the corresponding service, component, ... by using the DI of the AppServerModule.
from angular-prerender.
Thank you!
from angular-prerender.
Related Issues (20)
- Argument `--parameter-values` gives JSON parse error HOT 14
- An in-range update of husky is breaking the build 🚨 HOT 2
- An in-range update of guess-parser is breaking the build 🚨 HOT 1
- An in-range update of @angular-devkit/core is breaking the build 🚨 HOT 1
- "Multiple root routing modules" error when one lazy loading module is loaded from another HOT 6
- Improve parameter-values HOT 7
- An in-range update of eslint-config-holy-grail is breaking the build 🚨 HOT 1
- Add changelog HOT 1
- Support request: possible to deploy as cloud function? HOT 5
- Feature request: add support for `--exclude-routes *` HOT 9
- Please install ts-evaluator instead HOT 5
- duplicate app state in prerendered page HOT 8
- Feature Request: option for prerendering routes from a txt file --include-routes-file HOT 1
- Not picking up the routes array in angular.json HOT 9
- Question HOT 1
- Basic project example seems to be missing a step HOT 4
- How to use this plugin with https://prerender.io/ HOT 2
- An in-range update of core-js is breaking the build 🚨 HOT 1
- angular-prerender creates huge HTML file with CSS and source map HOT 6
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 angular-prerender.