trustworktech / create-react-ssr-app Goto Github PK
View Code? Open in Web Editor NEWSet up a modern react app with server side rendering by running one command.
Home Page: https://create-react-ssr-app.dev
License: MIT License
Set up a modern react app with server side rendering by running one command.
Home Page: https://create-react-ssr-app.dev
License: MIT License
So, i am not getting helmet tags in html on production server
Yes
Yes
CORS
System:
OS: macOS 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz
Binaries:
Node: 8.10.0 - /usr/local/bin/node
Yarn: 1.7.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Browsers:
Chrome: 75.0.3770.100
Firefox: 65.0.1
Safari: 12.1.1
npmPackages:
escape-string-regexp: ^2.0.0 => 2.0.0 (1.0.5, 1.0.5)
express: ^4.17.1 => 4.17.1
react: ^16.8.6 => 16.8.6
react-dom: ^16.8.6 => 16.8.6
react-ssr-scripts: 2.1.3 => 2.1.3
npmGlobalPackages:
create-react-ssr-app: Not Found
npx create-react-ssr-app
Font loads without CORS error
I created a new application using npx create-react-ssr-app my-app
. When attempting to run the application I recievce the error 'Error parsing app.html'.
Yes
Yes
System:
OS: Linux 3.10 Debian GNU/Linux 9 (stretch) 9 (stretch)
CPU: (40) x64 Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Browsers:
Chrome: Not Found
Firefox: Not Found
npmPackages:
escape-string-regexp: ^2.0.0 => 2.0.0 (1.0.5, 1.0.5)
express: ^4.17.1 => 4.17.1
react: ^16.8.6 => 16.8.6
react-dom: ^16.8.6 => 16.8.6
react-ssr-scripts: 2.1.3 => 2.1.3
npmGlobalPackages:
create-react-ssr-app: Not Found
npm run build
Build finishes without errors
Thanks for this awesome script, works perfect without any configs (after spending few hours with Razzle and scss). 👍
Looks like the styles are not loaded in development if Javascript is disabled. Though it works fine in production version. Wanted to test pages with SSR in development with Js turned off. Is there any way to make the css load as well? Not a deal breaker though.
Is it possible to customize webpack config? I'm using code splitting using react-loadable
and it require a ReactLoadablePlugin added to webpack.
(write your answer here)
(Write your answer here.)
(Write your answer here if relevant.)
(paste the output of the command here)
(Write your steps here:)
(Write what you thought would happen.)
(Write what happened. Please add screenshots!)
(Paste the link to an example project and exact instructions to reproduce the issue.)
Uncaught (in promise) SyntaxError: Unexpected end of input
(Write your answer here.)
(Write your answer here.)
(Write your answer here if relevant.)
(paste the output of the command here.)
(Write your steps here:)
(Write what you thought would happen.)
(Write what happened. Please add screenshots!)
(Paste the link to an example project and exact instructions to reproduce the issue.)
Thanks, @maxparelius for such a nice project. It looks really promising. Currently, I am facing an issue regarding fetching data on the server-side (as there is no example).
In Next.js/After.js we have a method named getInitialProps
to fetch data on the server-side. Does CRSA
have anything like that?
Hi, i'm try install, and receive this error.
`[eval]:3
init.apply(null, JSON.parse(process.argv[1]));
^
TypeError: init.apply is not a function
at [eval]:3:14
at Script.runInThisContext (vm.js:123:20)
at Object.runInThisContext (vm.js:312:38)
at Object. ([eval]-wrapper:6:22)
at Module._compile (internal/modules/cjs/loader.js:734:30)
at evalScript (internal/process/execution.js:56:25)
at executeUserCode (internal/bootstrap/node.js:499:5)
at startMainThreadExecution (internal/bootstrap/node.js:439:3)
Aborting installation.
node has failed.`
Running the production build script sets ASSETS_PATH
path to http://0.0.0.0:3030
Results in production:
<script src="http://0.0.0.0:3030/static/js/bundle.js"></script>
<script src="http://0.0.0.0:3030/static/js/0.chunk.js"></script>
<script src="http://0.0.0.0:3030/static/js/main.chunk.js"></script>
Local build uses relative path.
Any idea that might help?
This bug related to eslint.
yes
npm: 6.11.3
Environment Info:
System:
OS: Linux 4.15 Linux Mint 19.1 (Tessa)
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Binaries:
Node: 12.10.0 - ~/.nvm/versions/node/v12.10.0/bin/node
Yarn: Not Found
npm: 6.11.3 - ~/.nvm/versions/node/v12.10.0/bin/npm
Browsers:
Chrome: 77.0.3865.90
Firefox: 69.0.1
npmPackages:
react: ^16.10.0 => 16.10.0
react-dom: ^16.10.0 => 16.10.0
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
1. npx create-react-ssr-app my-app --typescript
2. eslint src/**/*.ts src/**/*.tsx
Eslint should work.
i get this error:
1:1 error Definition for rule '@typescript-eslint/consistent-type-assertions' was not found @typescript-eslint/consistent-type-assertions
Not needed.
typescript-eslint/typescript-eslint#863
facebook/create-react-app#7709
facebook/react#16845
Seems like updating react-scripts to ^3.1.2 fixes issue, but i cannot find u are using this package at all :) mby its dependency version related.
How could i deploy it to surge or node server?Trying to deploy it in firebase but it didn't work out
Hi!
I really enjoy your repo but I cannot find any information about creating your own API breakpoints.
Can you tell me how to write this:
app.get('/contact', (req,res) => {
res.send({id:1, name: 'test'});
}
and fetch this data from any components??
componentDidMount() {
fetch('/contact').then(resp => resp.json()).then(data => console.log(data));
}
I'm getting error and this breakpoint it's not working.
Please answer me beacuse of that I cannot use your app well ;/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.