react-scripts build failed in system.
nonokh opened this issue · 1 comments
my npm and node.js is updated but i am getting this npm bug?
This failed in my system:
react-scripts build
The error:
nono@nono-Inspiron-3542:~/domain_discovery_tool$ make
conda env update
Using Anaconda API: https://api.anaconda.org
Fetching package metadata .................
Solving package specifications: .
To activate this environment, use:
> source activate ddt
To deactivate this environment, use:
> source deactivate ddt
source activate ddt;
pushd client;
npm run build;
cp build/index.html build/domain_discovery_tool.html;
cp -rf public/font-awesome-4.7.0 build/static;
popd
~/domain_discovery_tool/client ~/domain_discovery_tool
DDT_react@0.1.0 build /home/nono/domain_discovery_tool/client
react-scripts build
Creating an optimized production build...
Failed to compile.
Module not found: Error: Cannot resolve module 'child_process' in /home/nono/domain_discovery_tool/client/node_modules/xmlhttprequest/lib
npm ERR! Linux 4.10.0-32-generic
npm ERR! argv "/home/nono/.conda/envs/ddt/bin/node" "/home/nono/.conda/envs/ddt/bin/npm" "run" "build"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! DDT_react@0.1.0 build: react-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the DDT_react@0.1.0 build script 'react-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the DDT_react package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! react-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs DDT_react
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls DDT_react
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/nono/domain_discovery_tool/client/npm-debug.log
cp: cannot stat 'build/index.html': No such file or directory
~/domain_discovery_tool
the npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/home/nono/.conda/envs/ddt/bin/node',
1 verbose cli '/home/nono/.conda/envs/ddt/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@3.10.10
3 info using node@v6.11.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle DDT_react@0.1.0prebuild: DDT_react@0.1.0prebuild: no script for prebuild, continuing
6 silly lifecycle DDT_react@0.1.0
7 info lifecycle DDT_react@0.1.0build: DDT_react@0.1.0build: unsafe-perm in lifecycle true
8 verbose lifecycle DDT_react@0.1.0
9 verbose lifecycle DDT_react@0.1.0build: PATH: /home/nono/.conda/envs/ddt/lib/node_modules/npm/bin/node-gyp-bin:/home/nono/domain_discovery_tool/client/node_modules/.bin:/home/nono/.conda/envs/ddt/bin:/usr/lib/jvm/java-8-oracle/jre//jre/bin:/opt/maven/bin:/usr/lib/jvm/java-8-oracle/jre/bin/java/jre/bin:/home/nono/anaconda3/bin:/home/nono/bin:/home/nono/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-9-oracle/bin:/usr/lib/jvm/java-9-oracle/db/binbuild: CWD: /home/nono/domain_discovery_tool/client
10 verbose lifecycle DDT_react@0.1.0
11 silly lifecycle DDT_react@0.1.0build: Args: [ '-c', 'react-scripts build' ]build: Returned: code: 1 signal: null
12 silly lifecycle DDT_react@0.1.0
13 info lifecycle DDT_react@0.1.0~build: Failed to exec build script
14 verbose stack Error: DDT_react@0.1.0 build:react-scripts build
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/home/nono/.conda/envs/ddt/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/home/nono/.conda/envs/ddt/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:891:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid DDT_react@0.1.0
16 verbose cwd /home/nono/domain_discovery_tool/client
17 error Linux 4.10.0-32-generic
18 error argv "/home/nono/.conda/envs/ddt/bin/node" "/home/nono/.conda/envs/ddt/bin/npm" "run" "build"
19 error node v6.11.0
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error DDT_react@0.1.0 build:react-scripts build
22 error Exit status 1
23 error Failed at the DDT_react@0.1.0 build script 'react-scripts build'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the DDT_react package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error react-scripts build
23 error You can get information on how to open an issue for this project with:
23 error npm bugs DDT_react
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls DDT_react
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
does it error come if ddt_api is not successfully make too?
Please update and compile again. I have added a temporary fix till npm fixes it.
f93caf9