kriasoft / react-app Goto Github PK
View Code? Open in Web Editor NEWCreate React App with server-side code support
Home Page: https://t.me/reactapp
License: MIT License
Create React App with server-side code support
Home Page: https://t.me/reactapp
License: MIT License
I installed react-app globally, then in an empty folder ran react-app new
.
then got the below
Scaffolding a new JavaScript application in /Users/admin/Documents/Development_Stuff/B/ra
Installing 'react-app-tools' from npm... This may take a couple minutes.
> [email protected] install /Users/admin/Documents/Development_Stuff/B/ra/node_modules/fsevents
> node install
[fsevents] Success: "/Users/admin/Documents/Development_Stuff/B/ra/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
> [email protected] postinstall /Users/admin/Documents/Development_Stuff/B/ra/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN @babel/[email protected] requires a peer of @babel/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ra No description
npm WARN ra No repository field.
npm WARN ra No license field.
+ [email protected]
added 1758 packages from 885 contributors in 76.217s
Error: Cannot find module '/Users/admin/Documents/Development_Stuff/B/ra/node_modules/react-app-tools/scripts/new'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Promise.resolve.then.then.then (/Users/admin/.config/yarn/global/node_modules/react-app/cli.js:107:13)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Im getting below error in cmd
Failed at the [email protected] start script 'webpack-dev-server --hot'.
Make sure you have the latest version of node.js and npm installed.
If you do, this is most likely a problem with the reactapp package,not with npm itself.
We need to add some screenshots (ideally animated GIFs) into README.md
file explaining how react-app
CLI tool works.
$ npm install -g react-app
$ react-app new
$ react-app run
React components inside the routes
folder (previously pages
) are intended to be used for rendering web pages (or modal dialogs), where each of these components matches a specific application route (see routes.json
.
package.json
{
...
"app": {
"sourcePath": "./src",
"outputPath": "./build",
"entry": [
"main.js",
"admin.js"
]
},
...
}
the steps in the readme and the demo app always referenced are two different stories entirely. i find the demo app to be something else (an overkill) a demo should at least show how to run a CRA generated app using react-app including just the app.browser.js, app.node.js and the config-overides.js . the app.node.js file example in the readme, makes reference to an asset.json file , no detail is provided about that file. the demo should at least show that
clicking both:
and
generate 404 error messages.
Ok, so I've just seen the new package.json (Fix #9 - https://github.com/kriasoft/react-app/blob/master/package.json ), but this differs from the package.json file as described in the features section (https://github.com/kriasoft/react-app/blob/master/template/package.json).
Why the difference? Isn't package.json described in the features section the correct package file, as it has the app-tools dev dependency?:
"devDependencies": { "react-app-tools": "^0.2.0"
Here the project s known as
react-app
but over on npm, https://www.npmjs.com/package/react-app-tools, it is known as
react-app-tools
You might wish to amend this.
I just installed the tool and created my first project.
$ react-app new
Scaffolding a new JavaScript application project.
Installing npm modules. This may take a couple minutes.
npm WARN enoent ENOENT: no such file or directory, open '/Users/steve/Projects/package.json'
npm WARN Projects No description
npm WARN Projects No repository field.
npm WARN Projects No README data
npm WARN Projects No license field.
All done! Now you can launch your app by running: npm start
$ ls
components core pages public test utils
$
In order to deploy your app to GH Pages or Firebase, you should be able to run:
$ react-app publish
Files to look into bin/react-app.js
, tools/run.js
Ref react-static-boilerplate > docs/recipes/deploy-to-github-pages.md
Hi,
How can we deploy an app in a S3 subfolder. Optimal solution is that all paths to scripts and css are relative to the homepage.
Instead of requiring an onClick event to navigate pages, it'd be nice to have a static available such as Link.to(path) to call after a complex process.
Hello can you fix the dependency of the react-app-tools by making it to its new version min. 3.1.6?
=== npm audit security report ===
┌──────────────────────────────────────────────────────────────────────────────┐
│ Manual Review │
│ Some vulnerabilities require your attention to resolve │
│ │
│ Visit https://go.npm.me/audit-guide for additional guidance │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High │ Missing Origin Validation │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ webpack-dev-server │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in │ >=3.1.6 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ react-app-tools [dev] │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ react-app-tools > webpack-dev-server │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://nodesecurity.io/advisories/725 │
└───────────────┴──────────────────────────────────────────────────────────────┘
$ react-app view config # Prints Webpack, Babel, Browsersync configurations
$ react-app view config.webpack.entry # Prints a single node from the configuration
I've been using v2 and when I first set it up, I remember having one comma appended to the body after mapping the assets. This was fixed by adding .join('')
to the ended of the return statement.
Now after upgrading to v3, I am getting the same treatment, but this time it is appending four commas and I can't get rid of them. Basically my markup looks like this at render:
<body>
,,
<div id="app"></div>
,,
</body>
Any idea what's going on?
I have a working CRA app that I want to add SSR to. This SDK looks promising!
I tried following the steps in the readme. Although the server does start, during loading I get a compilation error:
(function (exports, require, module, __filename, __dirname) { .react-datepicker-popper[data-placement^="bottom"] .react-datepicker__triangle, .react-datepicker-popper[data-placement^="top"] .react-datepicker__triangle, .react-datepicker__year-read-view--down-arrow, ^ SyntaxError: Unexpected token . at createScript (vm.js:53:10) at Object.runInThisContext (vm.js:95:10) at Module._compile (module.js:543:28) ...
This appears to be because I'm importing a css file from node_modules like so:
import "react-datepicker/dist/react-datepicker.css";
This works in the regular CRA app, but not after the migration. I'm not exactly sure how to fix that, but I assumed I might need to use config-overrides.js to add some custom babel configuration? However, when I add the default config-overrides.js. I get the following error:
/Users/<blahblahblah>/client/config-overrides.js:4 ...config, ^^^ SyntaxError: Unexpected token ... at createScript (vm.js:53:10) at Object.runInThisContext (vm.js:95:10) at Module._compile (module.js:543:28)
I'd rather address the first issue without having a custom configuration, but perhaps the second issue gives you a clue?
Thanks.
There should be documentation for explaining the server side code, as well as the folder structure. Even though it is inherited from create-react-app, some kind of documentation should be present.
Steps to Reproduce
NA
I would like to work on this.
Need to add e2e tests to this project
Followed docs but when running react-app run
I get: Error: Cannot find module 'react-app-tools/run'
I just installed this and tried it out and it fails automatically. What version of node can I use?
$ npm install -g react-app
/usr/local/bin/react-app -> /usr/local/lib/node_modules/react-app/bin/react-app.js
/usr/local/lib
`-- [email protected]
$ mkdir test-react-app
$ cd test-react-app
$ react-app new
/usr/local/lib/node_modules/react-app/bin/react-app.js:6
const { execSync, spawn } = require('child_process');
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:141:18)
at node.js:933:3
~/git/test-react-app
$ node --version
v5.7.1
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.