React | react-scripts: permissio

2023-02-07  本文已影响0人  刘月林Yuelin_MELB

react-scripts: permission denied

Reason:

react-scripts binary isn't executable, which is usually caused by a file permission problem. This means that your system does not recognize the file as executable.

Solutions:

  1. 重装 react-scripts: re-install react-scripts :
    • npm install react-scripts
  2. 更改文件的可执行权限: use the chmod command to change the executable permission of a file (it works in my issue)
    • chmod +x node_modules/.bin/react-scripts
      run successfully
  3. 重新初始化项目: if neither of these methods work, try reinitializing the project
        rm -rf node_modules
        npm install

补充

导致"react-scripts" 包无法被识别为可执行文件的原因可能有多个:

导致 "react-scripts" 包的可执行权限被更改的原因可能有:

上一篇 下一篇

猜你喜欢

热点阅读