Docker Compose example copies your current directory (including nodemodules) to the container. app is required, when the README for this repo states. Can you please explain why the COPY package.json. Make sure the dependency you want to be removed isn't being consumed directly or transitively within dependency as well as peerDependency block. I faced a similar problem when using docker-compose, however I do not understand this solution completely. It is initially git-cloned to WINDOWS system and by default gets file-endings for WINDOWS system and then the script runs on LINUX system and fails. So when I upgraded to nodejs:16, those dependencies returned.Īctually, the reason they came back because they were being internally used by a transitive dependency, which was listed within peerDependency block of package.json. Problem: The script that is used to check whether there is enough RAM memory provided to the docker is called frontend-mem-nag.sh. Note that the same process continues to work locally. ![]() When I was working with the nodejs:14 image, I moved certain dependencies from dependencies block to devDependencies block. errorThe command /bin/sh -c npm install returned a non-zero code: 1 errorThe process /usr/bin/docker failed with exit code 1. So, why did I think npm is installing both devDependencies as well as dependencies? docker - react - npm install returned a non-zero code: 1 Ask Question Asked 9 months ago Modified 9 months ago Viewed 391 times 0 Im starting studies with docker. (I am unsure if this behavior started from npm 8.0 or some previous versions) ![]() The difference between them is in version 8.0, npm will also install the dependencies listed within peerDependencies block. The image with nodejs:16 uses npm 8.0 whereas the one with nodejs:14 uses some npm version < 8.0. ![]() Since the code is proprietary, I can't share it. After struggling with this for weeks, I have finally found the root cause and it is really dumb of me to not pay attention to that, I don't want others to make the same mistake.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |