Git Product home page Git Product logo

starter-express's People

Contributors

cdock1029 avatar flexbox avatar mdingena avatar mjackson avatar ryanflorence avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

starter-express's Issues

Build fails due to missing React import

VS Code already complains about the missing React imports in the modules and build fails due to the same issue.

 npm run build

> [email protected] build /home/main/projects/remix/starter-express
> remix build && tsc -b

Building Remix app for production...
done!
app/App.tsx:7:6 - error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.

7     <html lang="en">
       ~~~~

app/App.tsx:8:8 - error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.

8       <head>
         ~~~~

Windows Issues

EDIT: node version 14.15.0

Scripts set NODE_ENV the unix way. Windows would be set NODE_ENV=developement. I THINK separating the env variable and concurrently bit with ; should work, but is failing for me.

To test I removed the NODE_ENV part and get the following when hitting localhost:3000

Cannot find module ./App.tsx

image

[0.8.1] Importing in data loader causes data-build directory to have incorrect structure

I wanted to import some test JSON data.

// data/routes/cybermonday-blackfriday/index.ts
import type { Loader } from '@remix-run/data'
import * as data from '../../../json/test-items.json'

export const loader: Loader = () => {
  return data
}

As you can see, json directory is a sibling of data directory.

Running tsc -b now results in a data-build directory like:

data-build
├── data
│   ├── global.js
│   └── routes
│       ├── cybermonday-blackfriday
│       │   └── index.js
│       └── index.js
└── json
    └── test-items.json

4 directories, 4 files

Which causes some problems when launching Remix, as it's expecting a data-build/routes directory which is not there in this case.

Changing the data loader to

import type { Loader } from '@remix-run/data'
//import * as data from '../../../json/test-items.json'

export const loader: Loader = () => {
  return null
}

and rerunning tsc -b:

data-build
├── data
│   ├── global.js
│   └── routes
│       ├── cybermonday-blackfriday
│       │   └── index.js
│       └── index.js
├── global.js
├── json
│   └── test-items.json
└── routes
    ├── cybermonday-blackfriday
    │   └── index.js
    └── index.js

6 directories, 7 files

Which correctly outputs the data-build/routes directory but doesn't seem to clean up the previous build. Are we supposed to manually clean these up?

server.js -> server.ts

Most folks will want to write all their code in TypeScript. Especially if there's more going on than just configuring remix. In my case, I use HTTP mocks in dev mode and I want that code in TypeScript. I'd love it if remix could help me with this since it's compiling everything else for me. Just feels like a poor DX experience to have to do something extra to get this working when none of my other code needs extra tooling figured out.

Data not loading or is cached

I'm trying to follow the example in the docs and it seems that team is not getting written to data-build/routes despite being present in the same places as the gist example. npm run dev doesn't seem to build the app correctly

Update: I manually added team.js to data-build/routes and got the Team component to render, however this does not solve the build issue

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loader = void 0;
let loader = async () => {
    return fetch("https://api.github.com/orgs/reacttraining/members");
};
exports.loader = loader;

pm2 script is broken

I cloned a new version of the starter-express, but when I go to run npm run dev I get the following error:

> [email protected] dev C:\Users\mikey\Websites\express_tester
> pm2-dev pm2.config.js

[
  Error: Script not found: C:\Users\mikey\Websites\express_tester\remix run
      at Object.Common.resolveAppAttributes (C:\Users\mikey\Websites\express_tester\node_modules\pm2\lib\Common.js:644:11)
      at C:\Users\mikey\Websites\express_tester\node_modules\pm2\lib\API.js:1132:35
      at C:\Users\mikey\Websites\express_tester\node_modules\async\internal\withoutIndex.js:8:40
      at replenish (C:\Users\mikey\Websites\express_tester\node_modules\async\internal\eachOfLimit.js:81:17)
      at C:\Users\mikey\Websites\express_tester\node_modules\async\internal\eachOfLimit.js:86:9
      at eachLimit (C:\Users\mikey\Websites\express_tester\node_modules\async\eachLimit.js:47:43)
      at awaitable (C:\Users\mikey\Websites\express_tester\node_modules\async\internal\awaitify.js:13:28)
      at startApps (C:\Users\mikey\Websites\express_tester\node_modules\pm2\lib\API.js:1116:7)
      at C:\Users\mikey\Websites\express_tester\node_modules\pm2\lib\API.js:1097:16
      at wrapper (C:\Users\mikey\Websites\express_tester\node_modules\async\internal\once.js:12:16)
]

Environment:

Windows 10
Node v12.21.0
npm v6.14.11
Starter express version current as of 4th March 2021.
Remix v13.0
pm2 v4.5.4

Warning: Did not expect server HTML to contain a <script> in <html>.

After cloning, installing, and running this example repo I see the following in the console:

Warning: Did not expect server HTML to contain a <script> in <html>. Warning: Did not expect server HTML to contain a <script> in <html>. head html App@http://localhost:3000/build/root.js:11:26 RemixErrorBoundary RemixRoute@http://localhost:3000/build/_shared/__remix-run/react-fd118932.js:528:14 Routes@http://localhost:3000/build/_shared/__remix-run/react-fd118932.js:690:27 Router@http://localhost:3000/build/_shared/react-router-44425546.js:8:283 RemixErrorBoundary RemixEntry@http://localhost:3000/build/_shared/__remix-run/react-fd118932.js:341:24 RemixBrowser@http://localhost:3000/build/_shared/__remix-run/react-fd118932.js:709:32

This does not occur if if I run npm run build and npm run start so it appears to be something to do with the development server.

install fails

Received this error with initial repo installation. (node v10 & v12)

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@remix-run%2fexpress - Not found
npm ERR! 404
npm ERR! 404  '@remix-run/[email protected]' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'starter-express'

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.