So I'm just learning and while following a tutorial which asks to install npm install --save-dev enzyme@3.8.0 enzyme-adapter-react-16@1.7.1
.
When I run npm test
, I get the following output:
(testdriven) linux@ubuntu:~/testdriven/testdriven-app/services/client$ npm install --save-dev enzyme@3.8.0 enzyme-adapter-react-16@1.7.1
npm WARN ts-pnp@1.0.0 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/react-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ enzyme@3.8.0
+ enzyme-adapter-react-16@1.7.1
updated 2 packages and audited 36587 packages in 21.377s
found 0 vulnerabilities
(testdriven) linux@ubuntu:~/testdriven/testdriven-app/services/client$ npm test
> client@0.1.0 test /home/linux/testdriven/testdriven-app/services/client
> react-scripts test
fs.js:1384
throw error;
^
Error: watch /home/linux/testdriven/testdriven-app/services/client/node_modules/.cache ENOSPC
at _errnoException (util.js:1022:11)
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
at NodeWatcher.watchdir (/home/linux/testdriven/testdriven-app/services/client/node_modules/sane/src/node_watcher.js:175:20)
at Walker.<anonymous> (/home/linux/testdriven/testdriven-app/services/client/node_modules/sane/src/common.js:116:12)
at emitTwo (events.js:126:13)
at Walker.emit (events.js:214:7)
at /home/linux/testdriven/testdriven-app/services/client/node_modules/walker/lib/walker.js:69:16
at go$readdir$cb (/home/linux/testdriven/testdriven-app/services/client/node_modules/graceful-fs/graceful-fs.js:162:14)
at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! Test failed. See above for more details.
Yet, when I run it as sudo npm test
, I get the expected result.
No tests found related to files changed since last commit.
Press `a` to run all tests, or run Jest with `--watchAll`.
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› Press p to filter by a filename regex pattern.
› Press q to quit watch mode.
› Press t to filter by a test name regex pattern.
› Press Enter to trigger a test run.
Reading other posts, I learned that ENOSPC
is a no space error. Which is not the case, I have 70GB free.
Is it a permission error? I manually checked the permissions and did not come across anything.
Any suggestion to figure this out would be great. I can continue with the tutorial for now but it would be nice to know what causes this and fix it.
Thanks!