Coder Social home page Coder Social logo

remix-run / grunge-stack Goto Github PK

View Code? Open in Web Editor NEW
301.0 10.0 57.0 1.01 MB

The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.

Home Page: https://remix.run/stacks

Arc 0.35% TypeScript 82.33% JavaScript 17.20% Shell 0.11%
aws remix-stack

grunge-stack's People

Contributors

camjackson avatar danielholmes avatar davidrossjones avatar dependabot[bot] avatar fzembow avatar harismh avatar jacob-ebey avatar joematune avatar kennethvdberghe avatar kentcdodds avatar kiliman avatar machour avatar mcansh avatar michaeldeboey avatar richardhpa avatar ryanflorence avatar salper avatar samstradling avatar tbeseda avatar themosaad 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  avatar  avatar

grunge-stack's Issues

LiveReload does not work

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

  1. npx [email protected]
  2. Choose Grunge stack
  3. npm run dev after the install script finishes
  4. Open an incognito browser, change a file, see that that live reloading does not work

Expected Behavior

The page should reload and reflect the file changes.

Actual Behavior

The page does not refresh automatically. A manual refresh shows the changes, indicating that the build was successful.

Setup fails

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

$ npx [email protected] --template remix-run/grunge-stack
? Where would you like to create your app? ./my-remix-app
? TypeScript or JavaScript? TypeScript
? Do you want me to run `npm install`? Yes

...

failed to load config from /Users/agonzalezjr/code/bluejay/my-remix-app/vitest.config.ts

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: Cannot find module 'node:path'
Require stack:
- /Users/agonzalezjr/code/bluejay/my-remix-app/node_modules/@vitejs/plugin-react/dist/index.cjs
- /Users/agonzalezjr/code/bluejay/my-remix-app/vitest.config.ts
- /Users/agonzalezjr/code/bluejay/my-remix-app/node_modules/vite/dist/node/chunks/dep-d29b4e33.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/agonzalezjr/code/bluejay/my-remix-app/node_modules/@vitejs/plugin-react/dist/index.cjs:3:14)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Object._require.extensions.<computed> [as .js] (file:///Users/agonzalezjr/code/bluejay/my-remix-app/node_modules/vite/dist/node/chunks/dep-d29b4e33.js:64030:17)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/agonzalezjr/code/bluejay/my-remix-app/node_modules/@vitejs/plugin-react/dist/index.cjs',
    '/Users/agonzalezjr/code/bluejay/my-remix-app/vitest.config.ts',
    '/Users/agonzalezjr/code/bluejay/my-remix-app/node_modules/vite/dist/node/chunks/dep-d29b4e33.js'
  ]
}



npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `vitest "--run"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/agonzalezjr/.npm/_logs/2022-10-29T19_47_48_046Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:e2e:run: `cross-env PORT=8811 start-server-and-test dev http://localhost:8811 "npx cypress run"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test:e2e:run script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/agonzalezjr/.npm/_logs/2022-10-29T19_47_48_168Z-debug.log
ERROR: "test -- --run" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] validate: `run-p "test -- --run" lint typecheck test:e2e:run`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] validate script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/agonzalezjr/.npm/_logs/2022-10-29T19_47_48_215Z-debug.log
🚨 Oops, remix.init failed

Command failed: npm run validate 

Expected Behavior

Setup finishes without errors.

Actual Behavior

Setup fails.

Tests not passing

Hi, I'm really excited about Stacks

But I tried to deploy the grunge Stack as it says in the README itself and after installing the tests idoesn't pass.

Tests that not pass
1) should allow you to register and login
2) should allow you to make a note

Gist with the errors
https://gist.github.com/JoaoGomes5/7cfa976ae9672ab5e7bd4c255ec7677a

I followed the tutorial video and it gives me an error right at the beginning, I don't understand why.

I already tried to create new projects and all of them did not pass the tests.

Thanks and have a great day!

msw doesn't seem to actually work with this setup

Not sure if I'm doing something wrong but when I run npm run dev I see that the mocks are being started and loaded with this log console.info("🔶 Mock server running");

However, if I change onUnhandledRequest to "error" like this server.listen({ onUnhandledRequest: "error" }); I never see any errors or logs about unhandled requests even though I'm definitely making requests to Stripe.

I've tried all sorts of things to debug but can't make progress.

Any ideas?

edit: seems like the sanbox is likely starting separate node processes to run the lambdas which MSW won't see.

Bug: Internal Server Error on Lambda

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

Deploy the template to AWS using the arc deployment

Attempt to sign up

Expect a 500 internal server error

Expected Behavior

Sign up should succeed

Actual Behavior

There is an internal server error with no logging at the time bycryptjs attempts to hash the password.

I added a try catch, still no error. So at that point I assumed this is a very low level issue.

Indeed, I added more memory to the aws lambda deployment to 1024 MB from the default 128 MB and hashing did not fail, I was able to log in.

I would suggest that the declaration:

memory 1024

Is added to the lambda, potentially 512 could fix the issue. I was not able to determine if it was due to CPU or RAM and both scale on memory within lambda

Replace `run-p` with `npm-run-all -p-` because the former doesn't kill all process when pressing CTRL+C in windows

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

  1. run npx create-remix my-app --template remix-run/grunge-stack
  2. cd my-app
  3. run pnpm dev
  4. Try to kill the process pressing CTRL+C

Expected Behavior

On windows, pressing CTRL+C should kill all the processes of the "dev" npm script.

Actual Behavior

On windows, pressing CTRL+C DOESN'T kill all the processes of the "dev" npm script.
It works if I replace the run-p with npm-run-all -p

cypress smoke tests fail out of the box

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

  • I created a new project using the grunge-stack template by running npx create-remix --template remix-run/grunge-stack
  • I ran npx run validate
  • The smoke tests fail both locally and in github actions
====================================================================================================

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        10.3.0                                                                         │
  │ Browser:        Electron 100 (headless)                                                        │
  │ Node Version:   v14.19.3 (/<redacted>/.nvm/versions/node/v14.19.3/bin/node)              │
  │ Specs:          1 found (smoke.cy.ts)                                                          │
  │ Searched:       cypress/e2e/**/*.cy.{js,jsx,ts,tsx}                                            │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  smoke.cy.ts                                                                     (1 of 1)


  smoke tests
    1) should allow you to register and login
    2) should allow you to make a note


  0 passing (3s)
  2 failing

  1) smoke tests
       should allow you to register and login:
     Error: The following error originated from your application code, not from Cypress.

  > Hydration failed because the initial UI does not match what was rendered on the server.

When Cypress detects uncaught errors originating from your application it will automatically fail the current test.

This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.

https://on.cypress.io/uncaught-exception-from-application
      at throwOnHydrationMismatch (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:8993:17)
      at tryToClaimNextHydratableInstance (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:9014:15)
      at updateHostComponent (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:14184:13)
      at beginWork (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:15256:22)
      at HTMLUnknownElement.callCallback2 (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:3458:22)
      at Object.invokeGuardedCallbackDev (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:3483:24)
      at invokeGuardedCallback (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:3517:39)
      at beginWork$1 (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:19039:15)
      at performUnitOfWork (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:18475:20)
      at workLoopSync (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:18411:13)

  2) smoke tests
       should allow you to make a note:
     Error: The following error originated from your application code, not from Cypress.

  > Hydration failed because the initial UI does not match what was rendered on the server.

When Cypress detects uncaught errors originating from your application it will automatically fail the current test.

This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.

https://on.cypress.io/uncaught-exception-from-application
      at throwOnHydrationMismatch (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:8993:17)
      at tryToClaimNextHydratableInstance (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:9014:15)
      at updateHostComponent (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:14184:13)
      at beginWork (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:15256:22)
      at HTMLUnknownElement.callCallback2 (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:3458:22)
      at Object.invokeGuardedCallbackDev (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:3483:24)
      at invokeGuardedCallback (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:3517:39)
      at beginWork$1 (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:19039:15)
      at performUnitOfWork (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:18475:20)
      at workLoopSync (http://localhost:8811/_static/build/entry.client-TUK4SINB.js:18411:13)

Expected Behavior

The cypress smoke tests should pass out of the box on a newly created project using the grunge-stack template

Actual Behavior

The cypress smoke tests fail out of the box

Error: Invariant failed: SESSION_SECRET must be set

What version of Remix are you using?

1.5.1

Steps to Reproduce

npx create-remix
gave it a name
chose "a pre-configured stack ready for prod..."
chose "Grunge" stack
chose "Typescript"
do you want me to run npm install? no
cd into new project directory
yarn
yarn dev
visit localhost:3000
see error


"dependencies": {
"@architect/architect": "^10.3.3",
"@architect/functions": "^5.1.0",
"@remix-run/architect": "^1.5.1",
"@remix-run/node": "^1.5.1",
"@remix-run/react": "^1.5.1",
"@remix-run/server-runtime": "^1.5.1",
"bcryptjs": "2.4.3",
"cuid": "^2.1.8",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"tiny-invariant": "^1.2.0"

Expected Behavior

run dev should load the initial page

Actual Behavior

getting this error:

Error

Process exited with 1

/home/user/MyProjects/remix-samples-rn/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:14
    throw new Error(value);
          ^
/home/user/MyProjects/remix-samples-rn/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:14
    throw new Error(value);
    ^

Error: Invariant failed: SESSION_SECRET must be set
    at invariant (/home/user/MyProjects/remix-samples-rn/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:14:11)
    at Object. (/home/user/MyProjects/remix-samples-rn/app/session.server.ts:7:1)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Module.require (node:internal/modules/cjs/loader:1013:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at [eval]:1:336
    at Script.runInThisContext (node:vm:131:12)

Warning: server timed out after hitting its 5s timeout!

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

Create a folder on a windows drive from within WSL and setup project there

mkdir /mnt/c/dev
cd dev 
npx create-remix --template remix-run/grunge-stack

-- or --

npm run validate

Result:

✓ Sandbox Started file watcher
Watching Remix app in development mode...
⚠️  Test routes enabled.
⚠️ Warning: mnt/c/dev/chess2/server timed out after hitting its 5s timeout!
⚠️ Warning: mnt/c/dev/chess2/server timed out after hitting its 5s timeout!
⚠️ Warning: mnt/c/dev/chess2/server timed out after hitting its 5s timeout!
⚠️ Warning: mnt/c/dev/chess2/server timed out after hitting its 5s timeout!
...

If the project is created in a linux folder (e.g. ~/dev/) it works just fine.

Expected Behavior

Tests run through

Actual Behavior

⚠️ Warning: mnt/c/dev/chess2/server timed out after hitting its 5s timeout!

is repeated forever

Fresh Grunge-Stack results in many browser console errors

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

  1. npx create-remix --template remix-run/grunge-stack
  2. npx remix init
  3. npm run dev

NOTE: This is completely fresh first run, no changes made at all.

Expected Behavior

No errors in console.

Actual Behavior

Screenshot 2022-07-18 093535

Cannot read file '../tsconfig.json'

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

npx create-remix --template remix-run/grunge-stack

Where would you like to create your app? remix-blog
Do you want me to run npm install? (Y/n) Y
TypeScript or JavaScript? JavaScript
Do you want to run the build/tests/etc to verify things are setup properly? Yes

error TS5083: Cannot read file '/Users/Siarhei_Liubimau/Documents/remix/remix-blog/tsconfig.json'.

Expected Behavior

The template should work out of the box.

Actual Behavior

The template is broken and unusable.

Error: expected <NPM script name that starts server> <url or port> <NPM script name that runs tests>

I'm getting the following error when running npm run validate

Steps to reproduce:

  1. run npx create-remix --template remix-run/grunge-stack
  2. run cd <your-app-name>
  3. run npm run validate

Extra info:

  • SO: windows 10
  • Node version: 14.18.1
  • npm version: 6.14.1

Also, I noticed this warning in the installation step:
npm WARN read-shrinkwrap This version of npm is compatible with [email protected], but package-lock.json was generated for [email protected] I'll try to do my best with it!
(which is expected because I have npm v6)

Looks like the error doesn't block the development server so I can live with it but I thought it would be good to report it so you guys can be aware of it.

Error: expected <NPM script name that starts server> <url or port> <NPM script name that runs tests>
example: start-test start 8080 test
see https://github.com/bahmutov/start-server-and-test#use

    at lazyAssLogic (D:\frontend-projects\experiments\my-remix-app\node_modules\lazy-ass\index.js:110:14)
    at lazyAss (D:\frontend-projects\experiments\my-remix-app\node_modules\lazy-ass\index.js:115:28)
    at Object.getArguments (D:\frontend-projects\experiments\my-remix-app\node_modules\start-server-and-test\src\utils.js:91:5)
    at Object.<anonymous> (D:\frontend-projects\experiments\my-remix-app\node_modules\start-server-and-test\src\bin\start.js:10:22)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:e2e:run: `cross-env PORT=8811 start-server-and-test dev http://localhost:8811 'cypress run'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:e2e:run script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Do not recommend creating long lived credentials for Github Actions

This is no longer required and I'd love to not see new projects start off using this legacy approach. AWS + Github can auth through OIDC

Article explaining what I'm talking about:
https://awsteele.com/blog/2021/09/15/aws-federation-comes-to-github-actions.html

Example cfn

Parameters:
  FullRepoName:
    Type: String
    Default: <full-repo-name>
Resources:
  Role:
    Type: 'AWS::IAM::Role'
    Properties:
      RoleName: github
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/AdministratorAccess'
      AssumeRolePolicyDocument:
        Statement:
          - Effect: Allow
            Action: 'sts:AssumeRoleWithWebIdentity'
            Principal:
              Federated: !Ref GithubOidc
            Condition:
              StringLike:
                'token.actions.githubusercontent.com:sub': !Sub 'repo:${FullRepoName}:*'
  GithubOidc:
    Type: 'AWS::IAM::OIDCProvider'
    Properties:
      Url: 'https://token.actions.githubusercontent.com'
      ThumbprintList:
        - 6938fd4d98bab03faadb97b34396831e3780aea1
      ClientIdList:
        - "sts.amazonaws.com"
Outputs:
  Role:
    Value: !GetAtt Role.Arn

Example step in github

      - name: Configure AWS credentials
        uses: aws-actions/[email protected]
        with:
          role-to-assume: <role>
          aws-region: us-east-1

Integrate esbuild with Arc deploy

This stack works very nicely and is a huge step forward. I do note that the deployed lambda is pretty large (7MB zip) and it's because it contains the entire node_modules directory (unpacked 29MB).

It would be really nice for server.js to be in TypeScript and to integrate esbuild into the Arc deploy process, not just the app compilation step, so only the needed code is deployed.

Starting project is throwing Error [ERR_PACKAGE_PATH_NOT_EXPORTED] error

Have you experienced this bug with the latest version of the template?

Yeah

Steps to Reproduce

  1. Create a new project with grunge-stack
  2. Start application using npm run dev

Expected Behavior

Expected application to run normally.

Actual Behavior

Following error thrown in cmd and application is not started

internal/modules/cjs/loader.js:456
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib' is not defined by "exports" in /Users/chenchunaidu/Programming/Personal/Product/recomnd/node_modules/headers-polyfill/package.json
    at new NodeError (internal/errors.js:322:7)
    at throwExportsNotFound (internal/modules/esm/resolve.js:332:9)
    at packageExportsResolve (internal/modules/esm/resolve.js:565:3)
    at resolveExports (internal/modules/cjs/loader.js:450:36)
    at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/Users/chenchunaidu/Programming/Personal/Product/recomnd/node_modules/msw/src/utils/request/MockedRequest.ts:5:25)
    

TypeError: interceptors.createInterceptor is not a function

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

Run npx create-remix --template remix-run/grunge-stack
(say Yes to everything)

Then run npm run validate, and you will see:

TypeError: interceptors.createInterceptor is not a function
    at setupServer (/Users/usr/src/my-remix-app/node_modules/msw/node/lib/index.js:8143:42)
    at mocks/index.js (/Users/usr/src/my-remix-app/mocks/index.js:3:16)
    at __require (/Users/usr/src/my-remix-app/server/index.js:12:50)
    at Object.<anonymous> (/Users/usr/src/my-remix-app/server.ts:5:3)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)

Or, run npm run dev and go to http://localhost:3000 and you will see the same error

Expected Behavior

The template should work out of the box

Actual Behavior

The template is broken and unusable

Type error on initial validate of the stack

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

❯ npx create-remix --template remix-run/grunge-stack

either select the validate option
-- or --
❯ npm run validate

server.ts:9:3 - error TS2739: Type 'typeof import("/Users/jtushman/code/remix-playground/notes/node_modules/@remix-run/dev/server-build")' is missing the following properties from type 'ServerBuild': publicPath, assetsBuildDirectory

9   build,
    ~~~~~

  node_modules/@remix-run/architect/dist/server.d.ts:18:5
    18     build: ServerBuild;
           ~~~~~
    The expected type comes from property 'build' which is declared here on type '{ build: ServerBuild; getLoadContext?: GetLoadContextFunction | undefined; mode?: string | undefined; }'

Expected Behavior

I'd expect the initial clean pull to validate

Actual Behavior

we are getting a type error

Try creating new Remix project using grunge stack but the cli freeze after asking me want to run verify build/tests/etc script

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

1./ Open PowerShell
2./ Run npx [email protected]
3./ Select options as the image below
Step to reproduce

Expected Behavior

The cli should proceed to the next step after I type 'N' and hit enter for Do you want to run the build/tests/etc to verify things are setup properly?

Actual Behavior

The cli freezed

"Lambda handler not found" error due to change in `@architect/architect` v10.6.0

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

  1. Upgrade @architect/architect to >=10.6
  2. npm run dev
  3. See error (occasionally)

Expected Behavior

Arc sandbox should detect the server file and run without issue.

Actual Behavior

There is a race condition between remix watch and void arc() that results in arc intermittently not being able to find the server build artifact. This happens pretty consistently on first boot or if the server/ directory is deleted before the build.

dev.js not needed?

Since we are not requiring the mocks in dev.js anymore, is this file still needed?

Couldn't we just start the sandbox using arc sandbox directly?

Deploy Error

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

Deploy new application on aws with github actions.

Expected Behavior

Deploy with Success

Actual Behavior

Run arc deploy --production --prune
  arc deploy --production --prune
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    npm_config_cache: /home/runner/.npm
    CI: true
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
         App ⌁ remix-aws-451b
      Region ⌁ us-west-[2](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:2)
     Profile ⌁ Set via environment
     Version ⌁ Architect 10.4.0
         cwd ⌁ /home/runner/work/remix-run-aws/remix-run-aws

⚬ Hydrate Finding dependencies
⚬ Hydrate Hydrating dependencies in 1 path
⚬ Hydrate Hydrating server/
✓ Hydrate Hydrated server/
  | npm i --production: added 97 packages from 165 contributors and audited 98 packages in [3](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:3).92[4](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:4)s
  | npm i --production: 41 packages are looking for funding
  | npm i --production: run `npm fund` for details
  | npm i --production: found 0 vulnerabilities
  | npm i --production: npm notice created a lockfile as package-lock.json. You should commit this file.
✓ Hydrate Successfully hydrated dependencies
⚬ Deploy This Lambda should ideally be under [5](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:5)MB for optimal performance:
  | server (29,535KB)
⚬ Deploy Creating new private deployment bucket: ****
⚬ Deploy Initializing deployment
  | Stack ... RemixAws451bProduction
  | Bucket .. ****
⚬ Deploy Created deployment templates
⚬ Deploy Generating CloudFormation deployment...
✓ Deploy Generated CloudFormation deployment
⚬ Deploy Deploying & building infrastructure...
deploy failed! 
Uploading to 8eb4[6](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:6)d[7](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:7)e0bc6041699a44022[8](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:8)4d7df[9](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:10)d.template  8892 / 8892.0  ([10](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:11)0.00%)
Waiting for changeset to be created..
Waiting for stack create/update to complete

Failed to create/update the stack. Run the following command
to fetch the list of events leading up to the failure
aws cloudformation describe-stack-events --stack-name RemixAws451bProduction

Error: 
Uploading to 8eb46d7e0bc6041699a4402284d7df9d.template  8892 / 8892.0  (100.00%)
Waiting for changeset to be created..
Waiting for stack create/update to complete

Failed to create/update the stack. Run the following command
to fetch the list of events leading up to the failure
aws cloudformation describe-stack-events --stack-name RemixAws451bProduction

    at ChildProcess.<anonymous> (/opt/hostedtoolcache/node/14.20.0/x64/lib/node_modules/@architect/architect/node_modules/@architect/deploy/src/sam/utils/spawn.js:23:16)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.emit (domain.js:475:[12](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:13))
    at maybeClose (internal/child_process.js:1088:[16](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:17))
    at Process.ChildProcess._handle.onexit (internal/child_process.js:[29](https://github.com/robsonkades/remix-run-aws/runs/7683794292?check_suite_focus=true#step:10:30)6:5)
Error: Process completed with exit code 1.

Architect Deployment order of Static assets

Hello! I did a deep dive into this stack tonight and have found an issue that I would like to get your thoughts on. It appears when Architect deploys the static assets, it does it in alphabetical order (or maybe random?). As you can guess, if we upload root first and a User goes to the app, they will get unexpected results since all the assets are not fully published. I have recreated this very easily by changing a few different files and adding new tailwind css classes so it will regen the .css file. I don't think this is a technical issue with Remix but I wanted to bring this up and offer to help drive a solution. Off the top of my head, I think the solution is uploading all of the assets except for the root file, leaving that last. I did some api doc searches in Architect, but I could not find a config that would allow us to affect the static asset upload process.

Great job on all of the work Remix has done so far!

The `cy.cleanupUser` function mentioned in README is missing

Have you experienced this bug with the latest version of the template?

yep

Steps to Reproduce

Follow the README and add:

afterEach(() => {
  cy.cleanupUser();
});

to the Cypress test file (smoke.cy.ts). Run Cypress tests.

Expected Behavior

Tests succeed and test users are deleted from db.

Actual Behavior

Tests fail with TypeError: cy.cleanupUser is not a function

Grunge/Arc template will not build

What version of Remix are you using?

1.6.2

Steps to Reproduce

  1. npx [email protected], choose grunge (arc)
  2. Choose production ready stack
  3. Run the install
  4. Run the verification

Expected Behavior

Expect the verification (npm run validate) to pass on the baseline install.

Actual Behavior

Generated setup-test-env.ts won't compile

The import

import { installGlobals } from "@remix-run/node/globals";

Doesn't exist. Has to be "@remix-run/node"

Generated server.ts won't compile

The import "@remix-run/dev/server-build" doesn't exist. The build variable probably has to be require("./server")

Unable to rerun npx remix init

Not sure if one should rerun npx remix init if it fails, but rerunning the command (after failing) complains about missing files in .github folder.

Error starting file watcher

Finally, continue to run npx remix init or npm run validate throws these:


Rebuilding...
Done in 126ms.
         App ⌁ remix-arc-e479
      Region ⌁ us-west-2
     Profile ⌁ hongyew
     Version ⌁ Architect 10.3.3
         cwd ⌁ /Users/hongyew/Projects/experiments/remix-arc

✓ Sandbox Found Architect project manifest: app.arc
✓ Sandbox Found testing environment variables: .env
✓ Sandbox Using testing live AWS infra: @tables
✓ Sandbox Started AWS service emulator
✓ Sandbox @tables created in local database
✓ Sandbox @http server started
✓ Sandbox Project files hydrated into functions
✓ Sandbox Available @http (HTTP API mode / Lambda proxy v2.0 format) routes
    any /* ................................ server

    http://localhost:8811

✓ Sandbox Started in 67ms
❤︎ Local environment ready!

✓ Sandbox Started file watcher
💿 Built in 273ms


/Users/hongyew/Projects/experiments/remix-arc/node_modules/@remix-run/server-runtime/dist/routes.js:18
  return Object.entries(manifest).filter(([, route]) => route.parentId === parentId).map(([id, route]) => ({ ...route,
                ^
/Users/hongyew/Projects/experiments/remix-arc/node_modules/@remix-run/server-runtime/dist/routes.js:18
  return Object.entries(manifest).filter(([, route]) => route.parentId === parentId).map(([id, route]) => ({ ...route,
                ^

TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at Object.createRoutes (/Users/hongyew/Projects/experiments/remix-arc/node_modules/@remix-run/server-runtime/dist/routes.js:18:17)
    at Object.createRequestHandler (/Users/hongyew/Projects/experiments/remix-arc/node_modules/@remix-run/server-runtime/dist/server.js:26:25)
    at createRequestHandler (/Users/hongyew/Projects/experiments/remix-arc/node_modules/@remix-run/architect/dist/server.js:35:28)
    at server.ts (/Users/hongyew/Projects/experiments/remix-arc/server.ts:8:24)
    at /Users/hongyew/Projects/experiments/remix-arc/server/index.js:8:56
    at Object.<anonymous> (/Users/hongyew/Projects/experiments/remix-arc/server/index.js:57:1)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)


/Users/hongyew/Projects/experiments/remix-arc/node_modules/@remix-run/server-runtime/dist/routes.js:18
  return Object.entries(manifest).filter(([, route]) => route.parentId === parentId).map(([id, route]) => ({ ...route,
                ^
/Users/hongyew/Projects/experiments/remix-arc/node_modules/@remix-run/server-runtime/dist/routes.js:18
  return Object.entries(manifest).filter(([, route]) => route.parentId === parentId).map(([id, route]) => ({ ...route,
                ^

TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at Object.createRoutes (/Users/hongyew/Projects/experiments/remix-arc/node_modules/@remix-run/server-runtime/dist/routes.js:18:17)
    at Object.createRequestHandler (/Users/hongyew/Projects/experiments/remix-arc/node_modules/@remix-run/server-runtime/dist/server.js:26:25)
    at createRequestHandler (/Users/hongyew/Projects/experiments/remix-arc/node_modules/@remix-run/architect/dist/server.js:35:28)
    at server.ts (/Users/hongyew/Projects/experiments/remix-arc/server.ts:8:24)
    at /Users/hongyew/Projects/experiments/remix-arc/server/index.js:8:56
    at Object.<anonymous> (/Users/hongyew/Projects/experiments/remix-arc/server/index.js:57:1)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)

Should ARC_APP_SECRET also be mentioned under Deployment in the docs?

It's my first time using Architect, and I've really enjoyed Remix! Really excited about this combo.

When following the getting started guide, in the Deployment section

⚠️ Warning: The environment variable "ARC_APP_SECRET" is not set - please set this in production to help mitigate potential session-related attacks!

Looking at the Architect docs on security, it definitely seems important to set.

Perhaps

npx arc env --add --env production ARC_APP_SECRET $(openssl rand -hex 32)

Should be added to the docs above the other production secret being set? I can make a quick PR if that makes sense.

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.