[GH-ISSUE #171] Uncaught Error: Cannot find module '/app/node_modules/nodemon/bin/nodemon.js' #150

Closed
opened 2026-02-26 06:30:49 +03:00 by kerem · 2 comments
Owner

Originally created by @FlexMBL on GitHub (Jul 21, 2019).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/171

I used git clone to grab the files.
Then ran the docker-compose in a dedicated directory for storage (/ZFSPOOL/).
Then started the container in portainer. But after a few seconds it shutdown. I checked the logs and saw the following error:

Uncaught Error: Cannot find module '/app/node_modules/nodemon/bin/nodemon.js'
FROM
Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:5)
Function.Module._load (internal/modules/cjs/loader.js:508:25)
Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
startup (internal/bootstrap/node.js:283:19)
bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

I saw a few other topics reported the same or similar error. But not any solution to how to fix this. What am i doing wrong here? (I'm new to docker, so the obvious is a possibility)

Originally created by @FlexMBL on GitHub (Jul 21, 2019). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/171 I used git clone to grab the files. Then ran the docker-compose in a dedicated directory for storage (/ZFSPOOL/). Then started the container in portainer. But after a few seconds it shutdown. I checked the logs and saw the following error: ``` Uncaught Error: Cannot find module '/app/node_modules/nodemon/bin/nodemon.js' FROM Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:5) Function.Module._load (internal/modules/cjs/loader.js:508:25) Function.Module.runMain (internal/modules/cjs/loader.js:754:12) startup (internal/bootstrap/node.js:283:19) bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) ``` I saw a few other topics reported the same or similar error. But not any solution to how to fix this. What am i doing wrong here? (I'm new to docker, so the obvious is a possibility)
kerem 2026-02-26 06:30:49 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jc21 commented on GitHub (Jul 23, 2019):

The docker-compose file is for development use only. Sorry for the confusion. If you want to develop and change the code, then I can provide more info.

<!-- gh-comment-id:514048839 --> @jc21 commented on GitHub (Jul 23, 2019): The docker-compose file is for development use only. Sorry for the confusion. If you want to develop and change the code, then I can provide more info.
Author
Owner

@lopugit commented on GitHub (Aug 11, 2020):

@jc21 hey I'm trying to do some development for your repo, adding static directory configurations instead of just proxies.

I tried simply cloning then running . scripts/start-dev but I get

An unexpected error occurred: "ENOENT: no such file or directory, open '/usr/local/share/.cache/yarn/v6/npm-semver-5.7.1-a954f931aeba508d307bbf069eff0c01c96116f7-integrity/node_modules/semver/.yarn-metadata.json'"

with full logs being

lopu@mp nginx-proxy-manager-static docker logs -f npmdev_npm_1
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
❯ Enabling IPV6 in hosts: /etc/nginx/conf.d
  ❯ /etc/nginx/conf.d/default.conf
  ❯ /etc/nginx/conf.d/dev.conf
  ❯ /etc/nginx/conf.d/include/proxy.conf
  ❯ /etc/nginx/conf.d/include/block-exploits.conf
  ❯ /etc/nginx/conf.d/include/ssl-ciphers.conf
  ❯ /etc/nginx/conf.d/include/force-ssl.conf
  ❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
  ❯ /etc/nginx/conf.d/include/ip_ranges.conf
  ❯ /etc/nginx/conf.d/include/assets.conf
  ❯ /etc/nginx/conf.d/include/resolvers.conf
❯ Enabling IPV6 in hosts: /data/nginx
yarn install v1.22.4
yarn install v1.22.4
[1/4] Resolving packages...
[1/4] Resolving packages...
[2/4] Fetching packages...
[2/4] Fetching packages...
error An unexpected error occurred: "ENOENT: no such file or directory, open '/usr/local/share/.cache/yarn/v6/npm-semver-5.7.1-a954f931aeba508d307bbf069eff0c01c96116f7-integrity/node_modules/semver/.yarn-metadata.json'".
info If you think this is a bug, please open a bug report with the information provided in "/app/backend/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error An unexpected error occurred: "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz: ENOENT: no such file or directory, open '/usr/local/share/.cache/yarn/v6/npm-semver-5.7.1-a954f931aeba508d307bbf069eff0c01c96116f7-integrity/node_modules/semver/.yarn-tarball.tgz'".
info If you think this is a bug, please open a bug report with the information provided in "/app/frontend/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Uncaught Error: Cannot find module '/app/backend/node_modules/nodemon/bin/nodemon.js'

FROM
./run: line 18:   341 Illegal instruction     node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
finish: applet not found
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

would love to add a pull request as I've edited the appropriate backend and frontend files to add a root_dir schema property and modified the location template to

  location {{ path }} {

		# {% if forward_host !== ''}
			proxy_set_header Host $host;
			proxy_set_header X-Forwarded-Scheme $scheme;
			proxy_set_header X-Forwarded-Proto  $scheme;
			proxy_set_header X-Forwarded-For    $remote_addr;
			proxy_pass       {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }};
		# {% endif %}   
		
		# {% if root_dir !== null}
		# 	root {{ root_dir }}
		# {% endif %}  
		
    {{ advanced_config }}
  }


Ok I fixed it by running . scripts/frontend-build first

Is that what you're meant to do?

Some contribution instructions would be helpful but I think I've got it :)

<!-- gh-comment-id:671751027 --> @lopugit commented on GitHub (Aug 11, 2020): @jc21 hey I'm trying to do some development for your repo, adding static directory configurations instead of just proxies. I tried simply cloning then running `. scripts/start-dev` but I get ```terminal An unexpected error occurred: "ENOENT: no such file or directory, open '/usr/local/share/.cache/yarn/v6/npm-semver-5.7.1-a954f931aeba508d307bbf069eff0c01c96116f7-integrity/node_modules/semver/.yarn-metadata.json'" ``` with full logs being ```terminal lopu@mp nginx-proxy-manager-static docker logs -f npmdev_npm_1 [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] done. [services.d] starting services [services.d] done. ❯ Enabling IPV6 in hosts: /etc/nginx/conf.d ❯ /etc/nginx/conf.d/default.conf ❯ /etc/nginx/conf.d/dev.conf ❯ /etc/nginx/conf.d/include/proxy.conf ❯ /etc/nginx/conf.d/include/block-exploits.conf ❯ /etc/nginx/conf.d/include/ssl-ciphers.conf ❯ /etc/nginx/conf.d/include/force-ssl.conf ❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf ❯ /etc/nginx/conf.d/include/ip_ranges.conf ❯ /etc/nginx/conf.d/include/assets.conf ❯ /etc/nginx/conf.d/include/resolvers.conf ❯ Enabling IPV6 in hosts: /data/nginx yarn install v1.22.4 yarn install v1.22.4 [1/4] Resolving packages... [1/4] Resolving packages... [2/4] Fetching packages... [2/4] Fetching packages... error An unexpected error occurred: "ENOENT: no such file or directory, open '/usr/local/share/.cache/yarn/v6/npm-semver-5.7.1-a954f931aeba508d307bbf069eff0c01c96116f7-integrity/node_modules/semver/.yarn-metadata.json'". info If you think this is a bug, please open a bug report with the information provided in "/app/backend/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. error An unexpected error occurred: "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz: ENOENT: no such file or directory, open '/usr/local/share/.cache/yarn/v6/npm-semver-5.7.1-a954f931aeba508d307bbf069eff0c01c96116f7-integrity/node_modules/semver/.yarn-tarball.tgz'". info If you think this is a bug, please open a bug report with the information provided in "/app/frontend/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. Uncaught Error: Cannot find module '/app/backend/node_modules/nodemon/bin/nodemon.js' FROM ./run: line 18: 341 Illegal instruction node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. finish: applet not found [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting. ``` would love to add a pull request as I've edited the appropriate backend and frontend files to add a root_dir schema property and modified the location template to ``` location {{ path }} { # {% if forward_host !== ''} proxy_set_header Host $host; proxy_set_header X-Forwarded-Scheme $scheme; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $remote_addr; proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }}; # {% endif %} # {% if root_dir !== null} # root {{ root_dir }} # {% endif %} {{ advanced_config }} } ``` Ok I fixed it by running `. scripts/frontend-build` first Is that what you're meant to do? Some contribution instructions would be helpful but I think I've got it :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#150
No description provided.