react-starter-kit | Amaze UI React Starter Kit- a skeleton for SPA | Frontend Framework library
kandi X-RAY | react-starter-kit Summary
kandi X-RAY | react-starter-kit Summary
Amaze UI React 快速入门套件,基于 React、Amaze UI 组件、react-router 及 gulp 开发 SPA。.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-starter-kit
react-starter-kit Key Features
react-starter-kit Examples and Code Snippets
Community Discussions
Trending Discussions on react-starter-kit
QUESTION
I've run into a roadblock trying to get my web app to run on a Windows Azure App Service.
My app has a Node.js/Express back-end written in TypeScript (compiled with tsc, not Webpack) and uses Sequelize to connect to a SQLite 3 database, stored locally. The front-end is a React app built on Create React App.
The problem is that when sequelize tries to require sqlite3, a MODULE_NOT_FOUND error occurs, causing sequelize to throw a "Please install sqlite3 package manually". (See full stack trace below.)
The sqlite3 folder with the expected files is clearly present in the node_modules folder in the Azure file system, so I really don't get how require("sqlite3")
could be failing.
Here's what I've tried so far:
- I tried pretty much every suggestion in this sequelize issue.
- I searched StackOverflow, but most of the questions relate to Electron, which I'm not using. Nonetheless, I read most of them, and tried any of the suggestions that seemed relevant.
- I made sure the version of node on my development machine is the same as on my Azure Window App Service (14.16.0).
- I tried deleting the node_modules folder and running
npm install --production
using the Azure console. - I tried running
npm rebuild
from the Azure console. - I tried running
npm cache verify
from the Azure console. - I tried globally installing sqlite3 using
npm install -g sqlite3
from the Azure console, but that action was forbidden by Azure. - I tried installing sqlite3 from the source using
npm install sqlite3 --build-from-source
. - I added console log statements to node_modules/sequelize/lib/dialects/abstract/connection-manager.js to verify that the module name passed to the require statement was
"sqlite3"
, and it was. - I tried replacing
moduleName
with the actual string,"sqlite3"
. - I checked to make sure all the sqlite3 files in my App Service file listing matched the ones installed on my development machine.
- I probably tried a lot of other things I'm not remembering right now!
Needless to say, none of these things made any difference. Every time I checked the logs, the error was the same (and I checked the timestamps to make sure the logging system was actually working.)
Here is the full stack trace:
Error: Please install sqlite3 package manually
- at ConnectionManager._loadDialectModule (C:\home\site\wwwroot\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:84:23)
- at new ConnectionManager (C:\home\site\wwwroot\node_modules\sequelize\lib\dialects\sqlite\connection-manager.js:24:21)
- at new SqliteDialect (C:\home\site\wwwroot\node_modules\sequelize\lib\dialects\sqlite\index.js:15:30)
- at new Sequelize (C:\home\site\wwwroot\node_modules\sequelize\lib\sequelize.js:340:20)
- at new Sequelize (C:\home\site\wwwroot\node_modules\sequelize-typescript\dist\sequelize\sequelize\sequelize.js:16:9)
- at getSequelize (C:\home\site\wwwroot\getDatabaseInfo.js:33:16)
- at Object.getDatabaseInfo [as default] (C:\home\site\wwwroot\getDatabaseInfo.js:15:23)
- at Object. (C:\home\site\wwwroot\server.js:55:47)
- at Module._compile (internal/modules/cjs/loader.js:1063:30)
- at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
- at Module.load (internal/modules/cjs/loader.js:928:32)
- at Function.Module._load (internal/modules/cjs/loader.js:769:14)
- at Module.require (internal/modules/cjs/loader.js:952:19)
- at Module.patchedRequire [as require] (C:\PROGRA~2\SITEEX~1\APPLIC~1\28F926~1.41\nodejs\node_modules\diagnostic-channel\dist\src\patchRequire.js:15:46)
- at require (internal/modules/cjs/helpers.js:88:18)
- at Object. (C:\Program Files (x86)\iisnode\interceptor.js:459:1)
What else can I try?
...ANSWER
Answered 2021-Oct-22 at 20:12This is not a terribly satisfying answer, but I tried creating a brand new Windows Azure App Service and deploying to it, and the issue did not occur.
I'm guessing this means the original App Service was either caching something or had become corrupted in some way, but I'm not sure.
Next step will be to see if I can figure out a way to revert the broken App Service to its original default state, redeploy to it, and see if it works.
Edit See this question.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-starter-kit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page