You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spent a day on this yesterday so I thought I'd leave this here for anyone else trying to solve this.
Was trying to get a pre-commit hook working that would run Cypress e2e tests. I kept running into the issue,
node:internal/modules/cjs/loader:1087
throw err;
^
Error: Cannot find module '/Users/admin/Library/Caches/Cypress/13.9.0/Cypress.app/Contents/MacOS/Contents/Resources/app/index.js'
at Function._resolveFilename (node:internal/modules/cjs/loader:1084:15)
at node:internal/modules/cjs/loader:929:27
at Function._load (node:electron/js2c/node_init:2:13357)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:96:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
That file didn't exist, and this would happen when I use VSCode's integrated source control to commit changes. But a command line git commit -m "..." worked fine.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Spent a day on this yesterday so I thought I'd leave this here for anyone else trying to solve this.
Was trying to get a pre-commit hook working that would run Cypress e2e tests. I kept running into the issue,
That file didn't exist, and this would happen when I use VSCode's integrated source control to commit changes. But a command line
git commit -m "..."
worked fine.The thing that got it working for me was this:
unset ELECTRON_RUN_AS_NODE
In my
.husky/pre-commit
fileBeta Was this translation helpful? Give feedback.
All reactions