Giter VIP home page Giter VIP logo

nodejs-goof's Issues

Broken dependencies

I found that the project has incompatible dependencies. It requires node "6.14.1" and dependencies require node ">=8".

I guess it because the project is old and needs to be updated. You could lock dependencies, so they don't require a higher node version.

Docker deployment doesn't work

I faced two main issues while trying to run this project locally using docker compose during a workshop. The two issues where:

  • goof would fail to start complaining about not being able to connect to mysql at localhost
  • I wasn't able to create a new todo, it would fail with the following error: TypeError: Busboy is not a constructor
    • I have modified the Dockerfile not to run npm update anymore.

I have opened this #1254 to fix both.

License is missing

The project/repo does not currently seem to have a license - is this intentional?

Intel based MAC OS 12.2.1 and Node v19.1 - docker build fails

It bombs right here:

goof-mongo  | {"t":{"$date":"2022-11-30T01:11:58.349+00:00"},"s":"I",  "c":"NETWORK",  "id":23016,   "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}}
goof        | 
goof        | > [email protected] start /usr/src/goof
goof        | > NODE_OPTIONS=--openssl-legacy-provider node app.js
goof        | 
goof        | node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
goof        | npm ERR! code ELIFECYCLE
goof        | npm ERR! errno 9
goof        | npm ERR! [email protected] start: `NODE_OPTIONS=--openssl-legacy-provider node app.js`
goof        | npm ERR! Exit status 9
goof        | npm ERR! 
goof        | npm ERR! Failed at the [email protected] start script.
goof        | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
goof        | 
goof        | npm ERR! A complete log of this run can be found in:
goof        | npm ERR!     /root/.npm/_logs/2022-11-30T01_11_58_558Z-debug.log
goof exited with code 9

Build fails with SyntaxError: Unexpected token

goof | {"app":{},"services":{},"isLocal":true,"name":"goof","port":6001,"bind":"localhost","urls":["http://localhost:6001"],"url":"http://localhost:6001"}
goof | Using Mongo URI mongodb://goof-mongo/express-todo
goof | /usr/src/goof/node_modules/cli-highlight/node_modules/chalk/source/index.js:103
goof | ...styles,
goof | ^^^
goof |
goof | SyntaxError: Unexpected token ...
goof | at createScript (vm.js:56:10)
goof | at Object.runInThisContext (vm.js:97:10)
goof | at Module._compile (module.js:549:28)
goof | at Object.Module._extensions..js (module.js:586:10)
goof | at Module.load (module.js:494:32)
goof | at tryModuleLoad (module.js:453:12)
goof | at Function.Module._load (module.js:445:3)
goof | at Module.require (module.js:504:17)
goof | at require (internal/module.js:20:19)
goof | at Object. (/usr/src/goof/node_modules/cli-highlight/dist/theme.js:10:28)
goof | at Module._compile (module.js:577:32)
goof | at Object.Module._extensions..js (module.js:586:10)
goof | at Module.load (module.js:494:32)
goof | at tryModuleLoad (module.js:453:12)
goof | at Function.Module._load (module.js:445:3)
goof | at Module.require (module.js:504:17)

[BUG]: goof docker build fails.

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

goof docker build fails and the container is exited.

santa@roli:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e7a8788d5e4d nodejs-goof_goof "npm start" 7 minutes ago Exited (9) 7 minutes ago goof
86ffaea201b0 mysql:5 "docker-entrypoint.sā€¦" 7 minutes ago Up 7 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp goof-mysql
b6ca72bb5cfe mongo "docker-entrypoint.sā€¦" 7 minutes ago Up 7 minutes 0.0.0.0:27017->27017/tcp goof-mongo

santa@roli:~$ docker logs goof

[email protected] start /usr/src/goof
NODE_OPTIONS=--openssl-legacy-provider node app.js

node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
npm ERR! code ELIFECYCLE
npm ERR! errno 9
npm ERR! [email protected] start: NODE_OPTIONS=--openssl-legacy-provider node app.js
npm ERR! Exit status 9
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-01-03T06_00_22_312Z-debug.log
santa@roli:~$ docker logs /root/.npm/_logs/2023-01-03T06_00_22_312Z-debug.log
Error: No such container: /root/.npm/_logs/2023-01-03T06_00_22_312Z-debug.log

Steps To Reproduce

git clone https://github.com/snyk-labs/nodejs-goof.git
cd nodejs-goof
docker-compose up --build

Additional Information

No response

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.