Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws error #7962

Closed
1 task done
emyot opened this issue Nov 10, 2023 · 8 comments
Closed
1 task done

aws error #7962

emyot opened this issue Nov 10, 2023 · 8 comments

Comments

@emyot
Copy link

emyot commented Nov 10, 2023

What version of Remix are you using?

2.2.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

7:56:00 PM [vite] page reload app/routes/_public.user-cv.tsx
X [ERROR] Could not resolve "mock-aws-s3"

    node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:43:28:
      43 │ ...= require('mock-aws-s3'); 
         ╵              ~~~~~~~~~~~~~   

  You can mark the path "mock-aws-s3"   
  as external to exclude it from the    
  bundle, which will remove this error. 
  You can also surround this "require"  
  call with a try/catch block to handle 
  this failure at run-time instead of   
  bundle-time.

X [ERROR] Could not resolve "nock"      

    node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:112:23:
      112 │ ... nock = require('nock');
          ╵                    ~~~~~~  

  You can mark the path "nock" as      
  external to exclude it from the      
  bundle, which will remove this error.
  You can also surround this "require" 
  call with a try/catch block to handle
  this failure at run-time instead of  
  bundle-time.

Expected Behavior

I'm a rookie, I don't understand this.

Actual Behavior

Displaying error during npm run dev

@pcattori
Copy link
Contributor

@emyot can you share a reproduction? ideally a link to a github repo with this issue (or even better, a stackblitz link), but even a description of the steps you took to arrive at this error would be useful. For example, which template/stack are you using?

@emyot
Copy link
Author

emyot commented Nov 15, 2023

Hi pedro, this is the repo: https://github.com/emyot/remix-v2-testapp.git. I don't know if you can view it since I set it to private. If yes, go ahead and look around at app/components/util/s3.server.ts and app/routes/_public.add.tsx, app/routes/_public.user-cv.tsx.
Thanks.

@pcattori
Copy link
Contributor

@emyot the repo you shared is private so I cannot access it. Can't find a way to reproduce this, so closing this issue, but happy to reopen if you are able to share a public reproduction

@VityaSchel
Copy link

Just got the same error

@VityaSchel
Copy link

Turns out it's issue with bcrypt
See here mapbox/node-pre-gyp#661

@jansedlon
Copy link

Also happens with argon2

@VityaSchel
Copy link

Also happens with argon2

Yes I initially used argon2 and then tried switching to bcrypt
I ended up going with node's native scrypt implementation

@VityaSchel
Copy link

But if you going to use scrypt from crypto, make sure to test parameters. Also you need to generate salt and store it yourself
I decided to go with cost factor (N parameter) equal to 4096, salt 16 bits, 100 rounds (loops of hashing) and 32bit resulted hash
on my mac m1 it takes about 1 second which is a pretty good result
but you should write implementation that takes into account information about hardware to decide N cost and rounds number and store that with hash like argon2 does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants