question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module 'better-sqlite3'

See original GitHub issue

Describe the bug Next js app breaks when installing wallet connect client "@walletconnect/sign-client": "^2.0.0-rc.0"

Error: Cannot find module 'better-sqlite3'
Require stack:
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/@walletconnect/keyvaluestorage/dist/cjs/node-js/index.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/@walletconnect/keyvaluestorage/dist/cjs/index.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/@walletconnect/core/dist/cjs/core.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/@walletconnect/core/dist/cjs/index.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/@walletconnect/sign-client/dist/cjs/client.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/@walletconnect/sign-client/dist/cjs/index.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/apps/next/.next/server/pages/sign-in.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/next/dist/server/require.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/next/dist/server/load-components.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/next/dist/build/utils.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/next/dist/build/output/store.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/next/dist/build/output/index.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/next/dist/cli/next-dev.js
- /Users/alejomendoza/Sites/skyhitz/skyhitz-expo-next/node_modules/next/dist/bin/next

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
0xAsimetriqcommented, Aug 16, 2022

@alejomendoza could you try with latest rc.2. Also, better-sqlite3 will only get used on server side (nodejs), so you should

  1. Install this dependency as per nodejs guide https://docs.walletconnect.com/2.0/javascript/guides/nodejs
  2. Only use sign sdk client side i.e within useEffect. Our wallet example actually uses this exact approach with nextjs https://github.com/WalletConnect/web-examples/tree/main/wallets/react-wallet-v2
0reactions
bkremcommented, Nov 25, 2022

Closing since this dependency is no longer used.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'better-sqlite3' when running in Docker ...
The fix is to move better-sqlite3": "^7.5.0 from the devDependencies section to the dependencies section in the \packages\backend\packages.json ...
Read more >
better-sqlite3 - npm
The fastest and simplest library for SQLite3 in Node.js. ... Start using better-sqlite3 in your project by running `npm i better-sqlite3`.
Read more >
I've a problem for install better-sqlite3 - node.js - Stack Overflow
Error : Cannot find module 'better-sqlite3' Require stack: - C:\Users\Thomas\Documents\lester\node_modules\quick.db\bin\handler.js ...
Read more >
Error about better-sqlite3 / node.js version - Glitch Support
Error about better-sqlite3 / node.js version ... the module (for instance, using npm rebuild or npm install ). ... Error: Cannot find module...
Read more >
Better-SQLite3 - Zeltux
Better-Sqlite3 - TypeError: Cannot open database because the directory does not exist ... Within the root directory of the bot, create a folder...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found