Updated from 0.46.1 to 0.47.0 (and just now on 0.4...
# help
p
Updated from 0.46.1 to 0.47.0 (and just now on 0.47.1) and ran into this error:
Copy code
2021-10-18T02:43:56.445Z	undefined	INFO	Executing '.build/src/apolloServer/lambda.handler' in function directory '/Users/myusername/dev/chimera/apps/iridium-backend'
internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module '../../build/Release/runtime-client.node'
Require stack:
- /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/RuntimeClient.js
- /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/index.js
- /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/index.js
- /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/bin/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at new RuntimeClient (/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/RuntimeClient.js:44:29)
    at Object.run (/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/index.js:44:20)
    at Object.<anonymous> (/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/bin/index.js:14:8)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/RuntimeClient.js',
    '/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/index.js',
    '/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/index.js',
    '/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/bin/index.js'
  ]
}
Looked in npx folder and
Copy code
'../../build/Release/runtime-client.node'
is not there... well the whole "build" folder is not there. Searched this slack channel and aws-lambda-ric seems like a pile 🙂. I've tried destroying the stacks and bringing them back up. Clearing caches etc.
git clean -fxd
it all! BURN ALL THE CACHING WHAHAHA but still same error 😕. Did I miss something on the upgrade or I'm not 100% sure what to even try or how to debug this...
t
did you try wiping node_modules?
p
yup
t
How are you running sst start?
p
Copy code
"sst:start": "sst start --stage $(aws iam  get-user --query 'User.UserName' --output text)",
t
What's bizarre is it's looking in
.npm/_npx
p
I'm running it with "rushx". I have a mono repo thats built with rushjs
t
and also for
aws-lambda-ric
which we don't depend on, we use our own forked version
@serverelsss-stack/aws-lambda-ric
p
I'm wondering if this is a rushjs issue...
t
ah that's possible, not super familiar with rush myself
did you ever try any of the betas for the new runtime server?
p
It stashes the shared node_modules under common/temp/node_modules in the root of the monorepo which things like VSCode have trouble finding that 😆
but all the packages are symlinks so its usually fine
I don't believe I tried any of the betas
I'm assuming thats a AWS thing?
Lock file says I"m using your stuff
Copy code
/@serverless-stack/aws-lambda-ric/2.0.4:
    resolution: {integrity: sha512-jBeyY/CSUx0FzREzud136GcLDlrgeCbaw3hmGfnN7kVw6+IZ+Fwtt6Ieib2cyPUgSfpZ5ayi3lAVIvD8QtxIpQ==}
    hasBin: true
    dependencies:
      node-addon-api: 3.2.1
      node-gyp: 8.1.0
    transitivePeerDependencies:
      - supports-color
I'm wondering if there is a chunk of code that is traversing up to find "node_modules" in the root and can't so it defaults to my npm/_npx folder?
Hey @thdxr I fixed it!
t
how!?
p
I used a hammer!
My guess is that because I'm running this with rushjs and the node_modules folder is in an odd spot that it couldn't find it for some reason. I added it as a dep
"@serverless-stack/aws-lambda-ric": "~2.0.4"
it it worked 🤷
t
that is really strange
I have to dig into rush, don't know much about it
p
Its pretty cool other than the node_modules location 😆
I'm going to attempt to blow away everything and double check that I don't have some odd flag but happy its working! Looking forward to the speed! Love the work you guys do!