docker build error: Cannot find module 'semver'
See original GitHub issueWhen attempting to build with the latest hospitalrun-frontend from github, I encounter the following error.
(Docker version 17.03.1-ce, build c6d412e on Ubuntu 14.04)
$ docker build -t hospitalrun-frontend .
...
module.js:471
throw err;
^
Error: Cannot find module 'semver'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/npm/lib/utils/unsupported.js:2:14)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Looks like it may be related to the following npm issue: https://github.com/npm/npm/issues/15611
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Docker: Error: Cannot find module 'semver' #16807 - GitHub
I've recently found myself running into this exact same problem while attempting to run builds within GitLab CI. It only occurs while using...
Read more >Npm install cannot find module 'semver' - Stack Overflow
After uninstalling Node, use Command Prompt, navigate to ...\Appdata\roaming\ (use the path from the error message). Try to delete the folder with del...
Read more >npm install – Cannot find module 'semver' issue - Bala's Blog
I have recently got an error "Cannot find module 'semver'" on my Ubuntu VM when doing npm install. + npm install ... ......
Read more >Npm can't find module "semver" error in Ubuntu 19.04
I was basically trying to make offline use of FreeCodeCamp. It asked me to run command 'npm ci' from which I started getting...
Read more >error Cannot find module 'semver' in (npm run dev) command ...
Coding example for the question error Cannot find module 'semver' in (npm run dev) command-Vue.js.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK, I fixed this error by getting rid of the npm update line (as described in this post: https://github.com/npm/npm/issues/15558)
I think the npm update causes a mismatch between the npm version and the cached modules, but I’m not really sure if that’s the cause. So I’d consider this more of a workaround than a fix!
changes to
Dockerfile
:I get this error also, isnt semver a core node module?