1

cannot install jest..

I am attempting to install jest with npm and i am getting the following error:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN jsdom@15.2.1 requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.2.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.2.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

npm ERR! Maximum call stack size exceeded

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-02-17T07_45_50_660Z-debug.log

obviously is see there is a problem with jsdom requiring canvas

I see this post about this issue jsdom requiring canvas

that basically says to upgrade npm... it did this, but it didn't work...

Edit: I tried to isntall canvas but i get and error:

npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/@babel/traverse/node_modules/ms
npm ERR! dest /c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/needle/node_modules/ms
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/@babel/traverse/node_modules/ms' -> '/c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/needle/node_modules/ms'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
skyboyer
  • 22,209
  • 7
  • 57
  • 64
user254340
  • 447
  • 2
  • 7
  • 21

0 Answers0