App reviews, troubleshooting, and recommendations
Hello. I am attempting to set up a remote mySQL database (on Amazon RDS) to contain sensitive shop-dependent data such as SHOPIFY_API_KEY, SHOPIFY_API_SECRET, GraphQL's adminAccessToken, GraphQL's url Endpoint, as well as some of my own shop-dependent data, etc.
I can do the import and access the database just fine from the web/index.js file, BUT I cannot get beyond the import statement in my page code located in the web/frontend/pages directory.
The import statement is this:
import mysql from 'mysql2';
The error message I see in the chrome console when this statement exists is this:
TypeError: Cannot read properties of undefined (reading 'NODE_DEBUG')
at mysql2.js?t=1689528236624&v=ab90f474:13449:24
at Array.forEach (<anonymous>)
at ../../node_modules/mysql2/lib/packets/index.js (mysql2.js?t=1689528236624&v=ab90f474:13447:29)
at __require2 (chunk-7REXU52E.js?v=784c7085:19:50)
at ../../node_modules/mysql2/lib/connection.js (mysql2.js?t=1689528236624&v=ab90f474:18400:19)
at __require2 (chunk-7REXU52E.js?v=784c7085:19:50)
at ../../node_modules/mysql2/index.js (mysql2.js?t=1689528236624&v=ab90f474:19749:22)
at __require2 (chunk-7REXU52E.js?v=784c7085:19:50)
at mysql2.js?t=1689528236624&v=ab90f474:19814:16
Can anyone shed some light on this? Thanks so much!
Cheers jb
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025