Coder Social home page Coder Social logo

kriasoft / react-app Goto Github PK

View Code? Open in Web Editor NEW
613.0 22.0 84.0 2.07 MB

Create React App with server-side code support

Home Page: https://t.me/reactapp

License: MIT License

JavaScript 76.76% HTML 6.47% CSS 3.53% TypeScript 13.24%
react reactjs server-side-rendering ssr webpack javascript babel isomorphic single-page-app boilerplate

react-app's Issues

issue with react-app

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)

Unable to start App

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.

Rename 'pages' folder to 'routes'

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.

assets.json file structure

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

No package.json created

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

$

Deploy app in S3 subfolder

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.

Vulnerabilty in webpack-dev-server dependency of react-app-tools

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
└───────────────┴──────────────────────────────────────────────────────────────┘

Add `react-app view config` command

$ react-app view config                # Prints Webpack, Babel, Browsersync configurations
$ react-app view config.webpack.entry  # Prints a single node from the configuration

v3 - Commas added in body

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?

Possible babel issues when migrating existing CRA

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.

Need documentation

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.

Add tests

Need to add e2e tests to this project

react-app new fails after install

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


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.