Reputation: 53
When I try to give 'npm start' in the frontend of my aplication, the shell gives a giant error. My package.json dont have any error of script, and I excluded the 'node_modules' and gived 'npm install' a lot of times. And error persists.
I've been researching about this since yesterday, and nothing.
The error:
internal/modules/cjs/loader.js:985
throw err;
^
Error: Cannot find module 'babel-code-frame'
Require stack:
- C:\Users\Helton\Documents\www\omnistack_bth\be-the-hero\frontend\node_modules\fork-ts-checker-webpack-plugin\lib\forma
tter\codeframeFormatter.js
- C:\Users\Helton\Documents\www\omnistack_bth\be-the-hero\frontend\node_modules\fork-ts-checker-webpack-plugin\lib\index
.js
- C:\Users\Helton\Documents\www\omnistack_bth\be-the-hero\frontend\node_modules\react-dev-utils\ForkTsCheckerWebpackPlug
in.js
- C:\Users\Helton\Documents\www\omnistack_bth\be-the-hero\frontend\node_modules\react-dev-utils\WebpackDevServerUtils.js
- C:\Users\Helton\Documents\www\omnistack_bth\be-the-hero\frontend\node_modules\react-scripts\scripts\start.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
at Function.Module._load (internal/modules/cjs/loader.js:864:27)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (C:\Users\Helton\Documents\www\omnistack_bth\be-the-hero\frontend\node_modules\fork-ts-checker
-webpack-plugin\lib\formatter\codeframeFormatter.js:4:19)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\Helton\\Documents\\www\\omnistack_bth\\be-the-hero\\frontend\\node_modules\\fork-ts-checker-webpack-plug
in\\lib\\formatter\\codeframeFormatter.js',
'C:\\Users\\Helton\\Documents\\www\\omnistack_bth\\be-the-hero\\frontend\\node_modules\\fork-ts-checker-webpack-plug
in\\lib\\index.js',
'C:\\Users\\Helton\\Documents\\www\\omnistack_bth\\be-the-hero\\frontend\\node_modules\\react-dev-utils\\ForkTsCheck
erWebpackPlugin.js',
'C:\\Users\\Helton\\Documents\\www\\omnistack_bth\\be-the-hero\\frontend\\node_modules\\react-dev-utils\\WebpackDevS
erverUtils.js',
'C:\\Users\\Helton\\Documents\\www\\omnistack_bth\\be-the-hero\\frontend\\node_modules\\react-scripts\\scripts\\star
t.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Helton\AppData\Roaming\npm-cache\_logs\2020-03-27T11_21_24_592Z-debug.log
I need, and want to solve that. If can you help me I would stay very happy.
Thanks!
Upvotes: 4
Views: 4179
Reputation: 391
Actually, this error appears when "babel-code-frame" module is missing from the project
write this command in terminal:
npm install --save-dev @babel/code-frame
Upvotes: 2