local-echo icon indicating copy to clipboard operation
local-echo copied to clipboard

Tests fail with "Cannot find module 'jsesc'"

Open pparkkin opened this issue 6 years ago • 4 comments

I get the following error when I run npm test.

$ npm test

> [email protected] test /home/pparkkin/src/local-echo
> jest

 FAIL  lib/Utils.test.js
  ● Test suite failed to run

    Cannot find module 'jsesc'

      at Object.<anonymous> (node_modules/@babel/generator/lib/generators/types.js:25:37)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        1.06s
Ran all test suites.
npm ERR! Test failed.  See above for more details.

I ran npm install first.

Node and npm versions.

$ npm --version
6.13.6
$ node --version
v10.15.2

pparkkin avatar Jan 18 '20 04:01 pparkkin

Try running npm audit fix --force

janellealag avatar Nov 04 '21 02:11 janellealag

I barely made a new react native project and with no additional code added I am getting the same error here. Error: Cannot find module 'jsesc'. I can't find anything anywhere about this.

Lyle-Rogers avatar Jan 21 '22 05:01 Lyle-Rogers

run npm audit fix --force resolve to me when I see the same error : Error: Cannot find module 'jsesc'. I can't find anything anywhere about this.

paolaguedes avatar Jan 22 '22 15:01 paolaguedes

just install it. npm i jsesc

fahad186 avatar Nov 26 '22 05:11 fahad186