Yet another build problem

So, I was about to build a node/loopback app, and I cannot find any solution to errors ocurring (and yes, I’ve tried Googling it, with no results). Below is the flow of the incorrect part of the build:

$ make build
docker build -t my-team/app-backend:XXXXX -f Dockerfile .
Sending build context to Docker daemon 187.9 kB

Step 1 : FROM node:latest
latest: Pulling from library/node

e100952a3162: Downloading 408.5 kB/900.7 kB

74ac3e888c51: Digest: sha256:sha256resultstring
Status: Downloaded newer image for node:latest
—> 08b024eb8e65
Step 2 : RUN mkdir -p /usr/src/app
—> Running in 2756a1ff7923
—> a71759ad4a4c
Error removing intermediate container 2756a1ff7923: rmdriverfs: Driver btrfs failed to remove root filesystem 2756a1ff7923d62e63078b95ed44e40cb5fba626a12bf92f69399f3d4cef693a: Failed to destroy btrfs snapshot /var/lib/docker/btrfs/subvolumes for 2756a1ff7923d62e63078b95ed44e40cb5fba626a12bf92f69399f3d4cef693a: operation not permitted
Step 3 : WORKDIR /usr/src/app
—> Running in 3eef7c1872e3
—> 4169795f2e7b
Error removing intermediate container 2756a1ff7923: nosuchcontainer: no such id: 2756a1ff7923d62e63078b95ed44e40cb5fba626a12bf92f69399f3d4cef693a
Step 4 : COPY package.json package-lock.json /usr/src/app/
—> 70bab3507255
Error removing intermediate container 2756a1ff7923: nosuchcontainer: no such id: 2756a1ff7923d62e63078b95ed44e40cb5fba626a12bf92f69399f3d4cef693a
Step 5 : RUN npm install
—> Running in 425c80e9b30e
npm info it worked if it ends with ok
npm info using npm@5.0.3
npm info using node@v8.1.3
npm info lifecycle accent-server@1.0.0~preinstall: accent-server@1.0.0
npm http fetch GET 200 https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz 1319ms
npm http fetch GET 200 https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz 110ms

… Tons of fetch GET 200s and some optionals skipped

npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/usr/src/app/node_modules/.staging/lodash-compat-7c1ddb62/internal/escapeRegExpChar.js’
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, mkdir '/usr/src/app/node_modules/.staging/fsevents-741bcc4f/node_modules/mkdirp/test’
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: /usr/src/app/node_modules/.staging/fsevents-741bcc4f/node_modules/mkdirp/test

npm ERR! path /usr/src/app/node_modules/.staging/firebase-admin-4dc03066
npm ERR! code EINVAL
npm ERR! errno -22
npm ERR! syscall chown
npm ERR! EINVAL: invalid argument, chown ‘/usr/src/app/node_modules/.staging/firebase-admin-4dc03066’

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-07-09T15_33_19_783Z-debug.log
The command ‘/bin/sh -c npm install’ returned a non-zero code: 1
make: *** [build] Error 1

make build returned exit code 2

Action failed: make build

Can anyone help?