我无法启动我的反应服务器..我不知道该怎么办!!还删除了缓存并再次安装了节点模块

时间:2019-04-17 15:44:05

标签: node.js reactjs npm

我试图启动我的反应服务器,我也尝试安装node_modules,但是仍然存在相同的问题。

  

client@0.1.0开始/ home / tarunmanchukonda / Desktop / UrbanSoal / client

react-scripts start

sh: 1: react-scripts: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! client@0.1.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the client@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tarunmanchukonda/.npm/_logs/2019-04-17T15_29_14_257Z-debug.log
tarunmanchukonda@tarunmanchukonda-Inspiron-5558:~/Desktop/UrbanSoal/client$ npm i
Unhandled rejection Error: EACCES: permission denied, mkdir '/home/tarunmanchukonda/.npm/_cacache/index-v5/67/0f'Soal/client/nod

Unhandled rejection Error: EACCES: permission denied, mkdir '/home/tarunmanchukonda/.npm/_cacache/index-v5/67/9a'home/tarunmanch

Unhandled rejection Error: EACCES: permission denied, mkdir '/home/tarunmanchukonda/.npm/_cacache/index-v5/67/59'npmjs.org/multi

Unhandled rejection Error: EACCES: permission denied, mkdir '/home/tarunmanchukonda/.npm/_cacache/content-v2/sha512/0b/dc'les-sc

Unhandled rejection Error: EACCES: permission denied, mkdir '/home/tarunmanchukonda/.npm/_cacache/index-v5/67/e9'p/UrbanSoal/cli

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tarunmanchukonda/.npm/_logs/2019-04-17T15_29_54_896Z-debug.log

1 个答案:

答案 0 :(得分:0)

未安装节点模块。而且,当您尝试安装它时,用户无权将文件写入目录。

尝试通过更改目录的权限

sudo chmod -R 777 <directory_name>/

尝试让当前用户访问该文件夹中的所有文件。

sudo chown -R <your username> <directory_name>

然后运行npm install