node.js - Cannot find module 'react-dev-utils/crossSpawn' exception React App
问题描述
I downloaded the installer node-v10.6.0-x64 and create-react-app-master package for working on React Application. After creating React App project on PhpStorm, I had the exception like this:
internal/modules/cjs/loader.js:582
throw err;
^
Error: Cannot find module 'react-dev-utils/crossSpawn'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (D:\Projects\ReactProjects\create-react-app-master\packages\react-scripts\bin\react-scripts.js:18:15)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: `cd packages/react-scripts && node bin/react-scripts.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ 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?
I tried writing to the terminal of PhpStorm:
npm install --save-dev react-dev-utils
but it doesn't help.
How to solve this?
解决方案
删除 node_modules 文件夹并运行 "npm install" 。希望这会奏效
推荐阅读
- c++ - 在 cygwin 中测试新的 boost 安装时出现 cpp 错误
- git - TFS 中的每次提交审查
- ios - iOS 自动填充假定密码之前的字段是用户名
- html - 无法被其父文档修改的 iframe
- facebook - 2 个独立的 facebook 像素 - 一个集成到 shopify 中,一个集成在 GTM 中 - 如何使其工作?
- amazon-web-services - AWS 应用程序源捆绑部署
- java - 遍历二维数组替换列的值(使代码通用)
- download - WGET:想要来自站点的所有文件/pdf,创建目录,但不下载文件
- java - JTextAreas 是否有一个“默认” KeyListener 来在按下键时显示字符?(consume() 避免显示字符)
- java - 写一个关于java/问题的基本租车程序