Ibrahim Nayaya
Ibrahim Nayaya

Reputation: 1

React js compile error

I am new to react, but I am stuck with this error since last week. somebody help me, please! Cannot read property 'thisCompilation' of undefined

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 log ging output above.

Upvotes: 0

Views: 7561

Answers (2)

Srijan Chaudhary
Srijan Chaudhary

Reputation: 697

What I see from the given issue is that react-script is unable to install from package.json file, if you are trying to install all the dependencies. You can try to run below commands to install the dependencies and verify them.

npm install react-scripts --save

npm audit fix

Upvotes: 1

gvbaker55
gvbaker55

Reputation: 9

I had the same problem. Here is my debug.log

I loaded nodemon and started the server using 'nodemon' instead of npm start. It looked like there were ambiguous start scripts. I don't know if this is a fix, but I was able to continue working, so that's a win in my book!

0 info it worked if it ends with ok
1 verbose cli [ '/Users/gb/.nvm/versions/node/v8.4.0/bin/node',
1 verbose cli   '/Users/gb/.nvm/versions/node/v8.4.0/bin/npm',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /Users/gb/.nvm/versions/node/v8.4.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/gb/Sites/TUTORIALS/REM/bookworm/bookworm-react/node_modules/.bin:/Users/gb/.nvm/versions/node/v8.4.0/bin:/usr/local/rvm/gems/ruby-1.9.3-p392/bin:/usr/local/rvm/gems/ruby-1.9.3-p392@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin
9 verbose lifecycle [email protected]~start: CWD: /Users/gb/Sites/TUTORIALS/REM/bookworm/bookworm-react
10 silly lifecycle [email protected]~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/gb/.nvm/versions/node/v8.4.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (/Users/gb/.nvm/versions/node/v8.4.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:927:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/gb/Sites/TUTORIALS/REM/bookworm/bookworm-react
16 verbose Darwin 15.6.0
17 verbose argv "/Users/gb/.nvm/versions/node/v8.4.0/bin/node" "/Users/gb/.nvm/versions/node/v8.4.0/bin/npm" "start"
18 verbose node v8.4.0
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `react-scripts start`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Upvotes: 1

Related Questions