Comments (4)
Do you have express module in your package.json?
I think you are missing step-5. You can use this package.json-
from getting-started-docker-mysql-nodejs.
I do have express in my package.json. This file was created by npm init and whenever I installed a new package. More Detail can be found here : https://stackoverflow.com/questions/59350084/nodejs-docker-container-immediately-stop-after-run-for-express-module-not-found
Below is my package.json:
{
"name": "paloit",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"start": "node server.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"arraylist": "^0.1.0",
"avl": "^1.4.4",
"body-parser": "^1.19.0",
"cheerio": "^1.0.0-rc.3",
"ejs": "^3.0.1",
"express": "^4.17.1",
"hashmap": "^2.4.0",
"hashtable": "git+https://github.com/fabrice102/node-hashtable.git",
"jquery": "^3.4.1",
"jsdom": "^15.2.1",
"morgan": "^1.9.1",
"multimap": "^1.1.0",
"mysql": "^2.17.1",
"request": "^2.88.0",
"sort-map": "^1.0.0",
"sorted-map": "^0.1.8",
"yargs": "^15.0.2"
}
}
from getting-started-docker-mysql-nodejs.
Error says that cannot find module express
which means you must have missed npm install
but this should not be the case if you have followed all the steps correctly.
from getting-started-docker-mysql-nodejs.
Solved: The problem was in my package.json indeed. I was missing express. Also arraylist was with small 'a' and in my server.js it was require('Arraylist') which created the conflict. Thank u.
from getting-started-docker-mysql-nodejs.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from getting-started-docker-mysql-nodejs.