internal/modules/cjs/loader.js:582 throw err

前端 未结 25 2114
有刺的猬
有刺的猬 2020-11-27 04:24

I\'m getting following Console Error. Error : Cannot find module

Here is the full error i\'m getting in console. What should I do?



        
25条回答
  •  天命终不由人
    2020-11-27 05:11

    For me, the Node package I was trying to use would only work on an older version of Node.

    I was able to fix it by using Homebrew to install an older version of Node:

    brew unlink node
    brew install node@12
    echo 'export PATH="/usr/local/opt/node@12/bin:$PATH"' >> ~/.zshrc
    

    In the above commands, you will need to edit the Node version and then export PATH command.

提交回复
热议问题