Giter Site home page Giter Site logo

Comments (4)

varunon9 avatar varunon9 commented on July 19, 2024

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.

oxfordhalfblood avatar oxfordhalfblood commented on July 19, 2024

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.

varunon9 avatar varunon9 commented on July 19, 2024

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.

oxfordhalfblood avatar oxfordhalfblood commented on July 19, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.