Added watch.json, now Cannot find module 'cssesc'

After adding a watch.json file, I started getting this error message that I wasn’t before:

Error: Cannot find module 'cssesc'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/rbd/pnpm-volume/f9191220-4a8e-484d-b0c6-06851ff4b379/node_modules/.registry.npmjs.org/@marp-team/marpit/2.4.2/node_modules/@marp-team/marpit/lib/postcss/pseudo_selector/replace.js:7:38)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)

Deleting the watch.json does not fix the problem.

Any thoughts?

Fix:

  1. Open terminal
  2. rm the node_modules folder
  3. npm install
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.