make build command is throwing error
gupta-pratik opened this issue · comments
Hi, I was trying to run this code locally.
I followed your steps but while running make build
command it is throwing the following error:
> cv@0.2.2 prebuild /Users/prateekg/personal/myprojects/cv
> echo [PRE-BUILD]; gulp populate --color
[PRE-BUILD]
/Users/prateekg/personal/myprojects/cv/node_modules/read-config/lib/load/merge-parents.js:122
return new ReadConfigError(`Parent config file not found \'${parentPath}\' for ${configPath}`);
^
ReadConfigError: Parent config file not found './build.json' for /Users/prateekg/personal/myprojects/cv/config/config.json
at parentConfigNotFound (/Users/prateekg/personal/myprojects/cv/node_modules/read-config/lib/load/merge-parents.js:122:12)
at mergeParentsSync (/Users/prateekg/personal/myprojects/cv/node_modules/read-config/lib/load/merge-parents.js:63:55)
at mergeParentsSync (/Users/prateekg/personal/myprojects/cv/node_modules/read-config/lib/load/merge-parents.js:66:24)
at Object.module.exports.sync (/Users/prateekg/personal/myprojects/cv/node_modules/read-config/lib/load/merge-parents.js:27:12)
at paths.map (/Users/prateekg/personal/myprojects/cv/node_modules/read-config/lib/load/index.js:28:29)
at Array.map (<anonymous>)
at Object.module.exports.sync (/Users/prateekg/personal/myprojects/cv/node_modules/read-config/lib/load/index.js:27:21)
at sync (/Users/prateekg/personal/myprojects/cv/node_modules/read-config/lib/read-config.js:42:19)
at Object.<anonymous> (/Users/prateekg/personal/myprojects/cv/gulpfile.js:76:14)
at Module._compile (internal/modules/cjs/loader.js:689:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cv@0.2.2 prebuild: `echo [PRE-BUILD]; gulp populate --color`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cv@0.2.2 prebuild 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! /Users/prateekg/.npm/_logs/2019-05-28T11_11_30_845Z-debug.log
FYI, I'm running it on MAC.
Can you please help in fixing the issue.
Thanks in advance :)
Hi @gupta-pratik !
Looks like you didn't run make setup
first.
Please try to run make setup
and after that just make
.
If this error would appear again - please attach the npm log file.
Thank you!
Hi @tbaltrushaitis ,
Thanks for looking into it.
I already ran make setup
command. The response of this command looks like this:
$ make setup
cp: illegal option -- u
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
cp: illegal option -- u
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
cp: illegal option -- u
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
[2019-05-29T11:38:53 IST] Created file [BUILD-0.2.2:1]
[2019-05-29T11:38:53 IST] Created file [BUILD_CONTENT:/Users/prateekg/personal/myprojects/cv/config/build.json]
[2019-05-29T11:38:53 IST] Created file [COMMIT:de6a88a4c1c65d40b8ffbab99fa6bb3d534198f8]
[2019-05-29T11:38:53 IST] Goal [DEFAULT:default]
[2019-05-29T11:38:53 IST] Goal [CURRENT:setup]
Did it ran successfully ?
Then I tried make
command, its also throwing the same error! 😢
This is the Npm log file logs:
$ cat /Users/prateekg/.npm/_logs/2019-05-29T06_16_51_301Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm@6.4.1
3 info using node@v10.15.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle cv@0.2.2~prebuild: cv@0.2.2
6 verbose lifecycle cv@0.2.2~prebuild: unsafe-perm in lifecycle true
7 verbose lifecycle cv@0.2.2~prebuild: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/prateekg/personal/myprojects/cv/node_modules/.bin:/Users/prateekg/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Users/prateekg/bin
8 verbose lifecycle cv@0.2.2~prebuild: CWD: /Users/prateekg/personal/myprojects/cv
9 silly lifecycle cv@0.2.2~prebuild: Args: [ '-c', 'echo [PRE-BUILD]; gulp populate --color' ]
10 silly lifecycle cv@0.2.2~prebuild: Returned: code: 1 signal: null
11 info lifecycle cv@0.2.2~prebuild: Failed to exec prebuild script
12 verbose stack Error: cv@0.2.2 prebuild: `echo [PRE-BUILD]; gulp populate --color`
12 verbose stack Exit status 1
12 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
12 verbose stack at EventEmitter.emit (events.js:182:13)
12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
12 verbose stack at ChildProcess.emit (events.js:182:13)
12 verbose stack at maybeClose (internal/child_process.js:962:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
13 verbose pkgid cv@0.2.2
14 verbose cwd /Users/prateekg/personal/myprojects/cv
15 verbose Darwin 17.7.0
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
17 verbose node v10.15.0
18 verbose npm v6.4.1
19 error code ELIFECYCLE
20 error errno 1
21 error cv@0.2.2 prebuild: `echo [PRE-BUILD]; gulp populate --color`
21 error Exit status 1
22 error Failed at the cv@0.2.2 prebuild script.
22 error This is probably not a problem with npm. There is likely additional logging output above.
23 verbose exit [ 1, true ]
Looks like cp
command in your OS doesn't have -u
option.
You can try to fix this. Open file Makefile
and at the top of it in these lines
$(shell [ -f NODE_ENV ] || cp -prfu config/.NODE_ENV ./NODE_ENV);
$(shell [ -f .bowerrc ] || cp -prfu config/.bowerrc ./);
$(shell [ -f .npmrc ] || cp -prfu config/.npmrc ./);
remove u
option. It should looks like this after that:
$(shell [ -f NODE_ENV ] || cp -prf config/.NODE_ENV ./NODE_ENV);
$(shell [ -f .bowerrc ] || cp -prf config/.bowerrc ./);
$(shell [ -f .npmrc ] || cp -prf config/.npmrc ./);
Also maybe in MacOS the SHELL
parameter should be set to: SHELL = /bin/bash
instead of /bin/sh
Hope this helps!
HI @tbaltrushaitis ,
I tried removing -u
option aswell but the make
command is still not working.
So, I've now dockerized this application to use Ubuntu image, all these commands are now working fine.
But now I'm facing only one issue, index.html
is referencing to few js
libraries in assets/js/lib
folder. But there is no folder created with lib
folder and no library files are there in dist
folder.
Can you please take a look why js library files are not getting copied to dist folder.
Adding the snapshot.
Hi!
As mentioned in README.md:
This will create/update webroot directory inside the project root. Use this directory as DocumentRoot in VirtualHost configuration of your web server.
So I believe you should re-point your web server into webroot directory instead of the dist
.
Please let me know if this help.
Thank you!
have you solved your problems? Can this issue be closed?
Thank you!
Closing due to inactivity of opener for more than 1 week.