# Docker: Install npm

**URL:** <https://forum.codewithmosh.com/t/docker-install-npm/4040>\
**Category:** Uncategorized\
**Created:** [April 11, 2021, 6:14am UTC](https://forum.codewithmosh.com/t/docker-install-npm/4040 "2021-04-11T06:14:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LyndaM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/lyndam/32/1352_2.png) [@LyndaM](https://forum.codewithmosh.com/u/LyndaM)\
**Post date:** [April 11, 2021, 6:14am UTC](https://forum.codewithmosh.com/t/docker-install-npm/4040/1 "2021-04-11T06:14:28Z")

</div>

I’m having a problem in the “Running Commands” section of ‘Building Images’ at “RUN npm install”. I’m getting the following error:

## =\> ERROR [4/4] RUN npm install 10.3s

> [4/4] RUN npm install:  
> #8 10.26 npm ERR! code CERT\_NOT\_YET\_VALID  
> #8 10.26 npm ERR! errno CERT\_NOT\_YET\_VALID  
> #8 10.26 npm ERR! request to [https://registry.npmjs.org/semver/-/semver-6.3.0.tgz](https://registry.npmjs.org/semver/-/semver-6.3.0.tgz) failed, reason: certificate is not yet valid  
> #8 10.30  
> #8 10.30 npm ERR! A complete log of this run can be found in:  
> #8 10.30 npm ERR! /root/.npm/\_logs/2021-04-04T14\_28\_29\_647Z-debug.log

I did a google search on the error, which said the error is because the date/time is wrong. I ran the ‘date’ command, and the date/time is showing Sun Apr 4 14:52:46 UTC 2021, making the alpine date a week behind the system date/time.

I’ve tried to update the container date/time, but it isn’t working, saying the /etc/timezone directory doesn’t exist. Does anyone have a way to sync the container date/time to the system date/time?

---

<div class="post-metadata">

**Author:** ![rpmacaspac](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@rpmacaspac](https://forum.codewithmosh.com/u/rpmacaspac)\
**Post date:** [April 11, 2021, 12:29pm UTC](https://forum.codewithmosh.com/t/docker-install-npm/4040/2 "2021-04-11T12:29:54Z")

</div>

@LyndaM,

Can you post your current working directory and the content of it.

---

<div class="post-metadata">

**Author:** ![LyndaM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/lyndam/32/1352_2.png) [@LyndaM](https://forum.codewithmosh.com/u/LyndaM)\
**Post date:** [April 11, 2021, 6:34pm UTC](https://forum.codewithmosh.com/t/docker-install-npm/4040/3 "2021-04-11T18:34:19Z")

</div>

root@DESKTOP-DHQ:/mnt/c/source/repos/UltimateDocker/react-app# ls -la  
total 1148  
drwxrwxrwx 1 root root 512 Apr 10 2021 .  
drwxrwxrwx 1 root root 512 Apr 10 2021 …  
-rwxrwxrwx 1 root root 15 Apr 10 2021 .dockerignore  
drwxrwxrwx 1 root root 512 Apr 10 2021 .git  
-rwxrwxrwx 1 root root 310 Apr 10 2021 .gitignore  
-rwxrwxrwx 1 root root 179 Apr 10 2021 Dockerfile  
-rwxrwxrwx 1 root root 3362 Apr 10 2021 README.md  
drwxrwxrwx 1 root root 512 Apr 10 2021 node\_modules  
-rwxrwxrwx 1 root root 657980 Apr 10 2021 package-lock.json  
-rwxrwxrwx 1 root root 813 Apr 10 2021 package.json  
drwxrwxrwx 1 root root 512 Apr 10 2021 public  
drwxrwxrwx 1 root root 512 Apr 10 2021 src  
-rwxrwxrwx 1 root root 507430 Apr 10 2021 yarn.lock  
root@DESKTOP-DHQ:/mnt/c/source/repos/UltimateDocker/react-app# pwd  
/mnt/c/source/repos/UltimateDocker/react-app  
root@DESKTOP-DHQ:/mnt/c/source/repos/UltimateDocker/react-app#
