score:0
Put your NODE_ENV at docker compose like this:
server:
image: your_image
environment:
- NODE_ENV=production
Then you can simplify your CMD to just CMD ["nodemon", "./server.js"]
score:0
Answering my own question here in case anyone sees a similar error: In my package.json, I had a dependency on node:
"dependencies": {
...
"node": "^8.10.0",
...
}
After removing this line, the docker container starts up correctly.
Source: stackoverflow.com
Related Query
- How can I get my NodeJS app to start in Docker
- How can I start my node server and react app at the same time?
- How can I get rid of the `Node "13.0.0-nightly20190802452b393c1f"` so that I can be able to create a react app using the `create-react-app` tool?
- How can I get an image from Youtube search App in react?
- How can i get data from Mongodb using mongoose, nodejs
- How can I get maximum value from Firebase in my React App
- How can I start my app in CRA and have it open with the Edge browser?
- How can I fetch data on every app start using nextjs
- How can I get this React/Redux app to render properly?
- How can I get images in react from nodeJS API server
- How do I get my react js app to start watching my sass files?
- How can I get my React App to correctly send page title in link previews? Using NGINX as proxy
- How can I get my MERN app to refresh correctly on heroku?
- How can I get calculator output displayed on my Reactjs calculator app
- How can I get input radio elements to horizontally align in react [material-ui]?
- How can I add live-reload to my nodejs server
- How can I get rid of the warning import/no-anonymous-default-export in React?
- How to know if react-router can go back to display back button in react app
- How can I get ownProps using reselect on redux?
- How can I get the device's ip on React Native?
- How can I get the URL address from the browser in ReactJS (servers URL)
- How can I get an input's value on a button click in a Stateless React Component?
- How can I get the state value in the reducer of createSlice?
- How can I get a variable from the path in react router?
- How can i get window.location.pathname on my test file using Jest?
- How can I get rid of my "@types/react/index" can only be default-imported using 'esModuleInterp' flag lint in React/TypeScript
- How can I get component's position by ref in React?
- How can I get data from a local file into my React app?
- How can i get postmessage data from react?
- How can I get the image url from IPFS info in React.js?
More Query from same tag
- React, Javascript - Could not find "store" in the context of "Connect(App)"
- Three js and react button inside group/mesh to call for my add function
- Using fullpagejs in React, how to trigger function on active slide without re-rendering entire page
- React - Too many re-renders after adding onClick
- Reactjs router - this.props.history.push is not rendering URL queries from same path
- React Router Component not Rendering
- Redux-Observable: modify state and trigger follow up action
- How to resize SVG to fill its container?
- Material-UI: classes isn't working with external SVG icons?
- Is the PureRenderMixin mixin obsolete now?
- Create Customizable React Table by filtering Each JSON Object
- How to properly import React JSX from separate file in Typescript 1.6
- react get data and render it in a modal
- how to pass a state to the gtm.js function?
- If don't send any id an URL how to handle that error in react js
- I have spent the last 8 hours trying to pass a simple JSON object with some data from an api through my express backend to one of my react components
- How to filter by id?
- Nothing is displayed in Browser while mapping through an array in ReactJS even though the array has elements
- Output multiple React apps from one Webpack config
- React lifecycle method on createElement()
- Add star rating in React
- Why is this error not ending up in my Redux Action's Catch?
- Update all react children components
- returning a nested object which is in an array using an api in react
- React-Redux: Value passing from one page to another
- Change font based on language reactjs
- React / MUI : How to call other class with hook to button in main App.js
- React testing with Jest : Destructuring assignment not working
- How to unselect the checkbox in the selectableRows by default (when there are no data rows) in mui-datatables?
- React getInitialState using props