After $npm install, Getting Error: Cannot find module '../lib/utils/unsupported.js'

后端 未结 12 2112
星月不相逢
星月不相逢 2021-02-03 21:52

I just came back to work on a React project after working in the Rails environment and found that I cannot run any NPM commands in my Mac terminal. I\'ve tried all the remedies

12条回答
  •  一整个雨季
    2021-02-03 22:08

    In my case, this happened after I performed a machine-wide clean-up of all node_modules folders. I had node installed with nvm and I started getting this error, no matter what node-related action I wanted to trigger:

    Error: Cannot find module '../lib/utils/unsupported.js'
    

    I solved it by doing the following:

    1. Restarted my computer
    2. Uninstalled nvm
    3. Installed a different node version

提交回复
热议问题