Error in Deployment of Next.js App to Vercel - django-rest-framework

I have trying to Develop a Next.js App using Next.js and my Custom Backend with Django. I have completed it Developing everything which I have wanted to but When I'm trying to Deploy it to Vercel It gives me Error with getStaticPaths Every time I do that, However I tried to make the minimal Blog App I could using Next.js and the Dynamic Routing it is working fine without any problem.
Can you please help me in it as It's the final Step for the Development of my Blog App
The Error I Encounter =>
PS D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode> npm run build
> downthecode#0.1.0 build D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode
> next build && next export
info - Using webpack 5. Reason: no next.config.js https://nextjs.org/docs/messages/webpack5
info - Checking validity of types
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
[== ] info - Generating static pages (0/16)
Error occurred prerendering page "/cateogary/[cateogary]". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read property '0' of undefined
at cateogaryPageFun (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\.next\server\pages\cateogary\[cateogary].js:63:39)
at d (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:33:498)
at bb (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:36:16)
at a.b.render (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:42:43)
at a.b.read (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:41:83)
at exports.renderToString (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:52:138)
at Object.renderPage (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\next-server\server\render.js:54:854)
at Function.getInitialProps (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\.next\server\pages\_document.js:603:19)
at loadGetInitialProps (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\next-server\lib\utils.js:5:101)
at renderToHTML (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\next-server\server\render.js:54:1145)
Error occurred prerendering page "/hashtag/[hashtag]". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read property 'map' of undefined
at hashtagPageFun (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\.next\server\pages\hashtag\[hashtag].js:117:35)
at d (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:33:498)
at bb (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:36:16)
at a.b.render (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:42:43)
at a.b.read (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:41:83)
at exports.renderToString (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:52:138)
at Object.renderPage (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\next-server\server\render.js:54:854)
at Function.getInitialProps (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\.next\server\pages\_document.js:603:19)
at loadGetInitialProps (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\next-server\lib\utils.js:5:101)
at renderToHTML (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\next-server\server\render.js:54:1145)
[=== ] info - Generating static pages (8/16)
Error occurred prerendering page "/posts/[post]". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read property 'Headline' of undefined
at index (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\.next\server\pages\posts\[post].js:745:32)
at d (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:33:498)
at bb (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:36:16)
at a.b.render (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:42:43)
at a.b.read (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:41:83)
at exports.renderToString (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\react-dom\cjs\react-dom-server.node.production.min.js:52:138)
at Object.renderPage (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\next-server\server\render.js:54:854)
at Function.getInitialProps (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\.next\server\pages\_document.js:603:19)
at loadGetInitialProps (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\next-server\lib\utils.js:5:101)
at renderToHTML (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\next-server\server\render.js:54:1145)
info - Generating static pages (16/16)
> Build error occurred
Error: Export encountered errors on following paths:
/cateogary/[cateogary]
/hashtag/[hashtag]
/posts/[post]
at D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\export\index.js:31:1106
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Span.traceAsyncFn (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\telemetry\trace\trace.js:6:584)
at async D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\build\index.js:45:49
at async Span.traceAsyncFn (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\telemetry\trace\trace.js:6:584)
at async D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\build\index.js:27:1475
at async Span.traceAsyncFn (D:\Web Developement\Next Projects\BlogX\Down the Code\downthecode\node_modules\next\dist\telemetry\trace\trace.js:6:584)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! downthecode#0.1.0 build: `next build && next export`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the downthecode#0.1.0 build 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\coder\AppData\Roaming\npm-cache\_logs\2021-07-25T09_16_55_757Z-debug.log
The Code of the Repo can be found here => https://github.com/coderaman07/Days-of-Code

Your serverDomain is always serverDomain = 'http://127.0.0.1:8000', because domainName.isInDevelopement always "True" (as a string type whihc does not make any to be fair).
So you are basically trying to fetch from localhost, but there is nothing there at Vercel localhost, python backend is not running there.

Related

Got an error when I build WebRTC with rtc_use_h264=true

Got an error when I build WebRTC.
This is my build args
INFO:root:Building WebRTC with args: target_os="ios" ios_enable_code_signing=false
use_xcode_clang=true is_component_build=false is_debug=false is_component_build=false
rtc_include_tests=false rtc_enable_protobuf=false use_rtti=true use_custom_libcxx=false
rtc_use_h264=true ffmpeg_branding="Chrome" is_debug=false target_cpu="arm64"
ios_deployment_target="10.0" rtc_libvpx_build_vp9=true enable_ios_bitcode=false
use_goma=false enable_dsyms=true enable_stripping=true
Full error log:
INFO:root:Building target: framework_objc
ninja: Entering directory `/webrtc-checkout/src/out_ios_libs/arm64_libs'
[85/168] LIBTOOL-STATIC obj/third_party/ffmpeg/libffmpeg_internal.a
FAILED: obj/third_party/ffmpeg/libffmpeg_internal.a
rm -f obj/third_party/ffmpeg/libffmpeg_internal.a && TOOL_VERSION=1592470677 python ../../build/toolchain/mac/filter_libtool.py /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -D -o obj/third_party/ffmpeg/libffmpeg_internal.a -filelist obj/third_party/ffmpeg/libffmpeg_internal.a.rsp
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file list file: obj/third_party/ffmpeg/libffmpeg_internal.a.rsp is empty

many errors running npm run watch-poll command

I tried to remove usused packeges("beyondcode/laravel-websockets": "^1.0" and "pusher/pusher-php-server": "~3.0") from my composer and after that I
got error running :
$ npm run watch-poll
> # watch-poll /mnt/_work_sdb8/wwwroot/lar/votes
> npm run watch -- --watch-poll
> # watch /mnt/_work_sdb8/wwwroot/lar/votes
> npm run development -- --watch "--watch-poll"
> # development /mnt/_work_sdb8/wwwroot/lar/votes
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"
Additional dependencies must be installed. This will only take a moment.
Running: yarn add vue-template-compiler --dev --production=false
Usage: yarn [options]
yarn: error: no such option: --dev
/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/webpack-cli/bin/cli.js:93
throw err;
^
Error: Command failed: yarn add vue-template-compiler --dev --production=false
Usage: yarn [options]
yarn: error: no such option: --dev
at checkExecSyncError (child_process.js:616:11)
at Object.execSync (child_process.js:653:13)
at Dependencies.execute (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/Dependencies.js:53:22)
at dependencies.reject.tap.dependencies (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/Dependencies.js:32:22)
at Array.value (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/helpers.js:24:13)
at Dependencies.install (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/Dependencies.js:31:14)
at Function.dependencies (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/Assert.js:77:40)
at concat.filter.tap.dependencies (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/components/ComponentFactory.js:131:24)
at Array.value (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/helpers.js:24:13)
at ComponentFactory.installDependencies (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/components/ComponentFactory.js:130:14)
at Mix.listen (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/components/ComponentFactory.js:55:44)
at events.(anonymous function).forEach.handler (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/Dispatcher.js:34:47)
at Array.forEach (<anonymous>)
at Dispatcher.fire (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/Dispatcher.js:34:28)
at Mix.dispatch (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/src/Mix.js:119:25)
at Object.<anonymous> (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/laravel-mix/setup/webpack.config.js:19:5)
at Module._compile (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at WEBPACK_OPTIONS (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/webpack-cli/bin/utils/convert-argv.js:116:13)
at requireConfig (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/webpack-cli/bin/utils/convert-argv.js:118:6)
at /mnt/_work_sdb8/wwwroot/lar/votes/node_modules/webpack-cli/bin/utils/convert-argv.js:125:17
at Array.forEach (<anonymous>)
at module.exports (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/webpack-cli/bin/utils/convert-argv.js:123:15)
at yargs.parse (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/webpack-cli/bin/cli.js:71:45)
at Object.parse (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
at /mnt/_work_sdb8/wwwroot/lar/votes/node_modules/webpack-cli/bin/cli.js:49:8
at Object.<anonymous> (/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/webpack-cli/bin/cli.js:365:3)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # development 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! /home/serge/.npm/_logs/2019-07-05T14_34_47_549Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # watch: `npm run development -- --watch "--watch-poll"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # watch 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! /home/serge/.npm/_logs/2019-07-05T14_34_47_571Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # watch-poll: `npm run watch -- --watch-poll`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # watch-poll 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! /home/serge/.npm/_logs/2019-07-05T14_34_47_590Z-debug.log
Mentioned files has content :
2019-07-05T14_34_47_549Z-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'run',
1 verbose cli 'development',
1 verbose cli '--',
1 verbose cli '--watch',
1 verbose cli '--watch-poll' ]
2 info using npm#6.9.0
3 info using node#v10.15.3
4 verbose run-script [ 'predevelopment', 'development', 'postdevelopment' ]
5 info lifecycle #~predevelopment: #
6 info lifecycle #~development: #
7 verbose lifecycle #~development: unsafe-perm in lifecycle true
8 verbose lifecycle #~development: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/home/serge/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/serge/.composer/vendor/bin
9 verbose lifecycle #~development: CWD: /mnt/_work_sdb8/wwwroot/lar/votes
10 silly lifecycle #~development: Args: [ '-c',
10 silly lifecycle 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"' ]
11 silly lifecycle #~development: Returned: code: 1 signal: null
12 info lifecycle #~development: Failed to exec development script
13 verbose stack Error: # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid #
15 verbose cwd /mnt/_work_sdb8/wwwroot/lar/votes
16 verbose Linux 4.15.0-54-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "development" "--" "--watch" "--watch-poll"
18 verbose node v10.15.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"`
22 error Exit status 1
23 error Failed at the # development script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
2019-07-05T14_34_47_571Z-debug.log :
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'run',
1 verbose cli 'watch',
1 verbose cli '--',
1 verbose cli '--watch-poll' ]
2 info using npm#6.9.0
3 info using node#v10.15.3
4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
5 info lifecycle #~prewatch: #
6 info lifecycle #~watch: #
7 verbose lifecycle #~watch: unsafe-perm in lifecycle true
8 verbose lifecycle #~watch: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/home/serge/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/serge/.composer/vendor/bin
9 verbose lifecycle #~watch: CWD: /mnt/_work_sdb8/wwwroot/lar/votes
10 silly lifecycle #~watch: Args: [ '-c', 'npm run development -- --watch "--watch-poll"' ]
11 silly lifecycle #~watch: Returned: code: 1 signal: null
12 info lifecycle #~watch: Failed to exec watch script
13 verbose stack Error: # watch: `npm run development -- --watch "--watch-poll"`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid #
15 verbose cwd /mnt/_work_sdb8/wwwroot/lar/votes
16 verbose Linux 4.15.0-54-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "watch" "--" "--watch-poll"
18 verbose node v10.15.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error # watch: `npm run development -- --watch "--watch-poll"`
22 error Exit status 1
23 error Failed at the # watch script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
2019-07-05T14_34_47_590Z-debug.log :
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'watch-poll' ]
2 info using npm#6.9.0
3 info using node#v10.15.3
4 verbose run-script [ 'prewatch-poll', 'watch-poll', 'postwatch-poll' ]
5 info lifecycle #~prewatch-poll: #
6 info lifecycle #~watch-poll: #
7 verbose lifecycle #~watch-poll: unsafe-perm in lifecycle true
8 verbose lifecycle #~watch-poll: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/home/serge/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/serge/.composer/vendor/bin
9 verbose lifecycle #~watch-poll: CWD: /mnt/_work_sdb8/wwwroot/lar/votes
10 silly lifecycle #~watch-poll: Args: [ '-c', 'npm run watch -- --watch-poll' ]
11 silly lifecycle #~watch-poll: Returned: code: 1 signal: null
12 info lifecycle #~watch-poll: Failed to exec watch-poll script
13 verbose stack Error: # watch-poll: `npm run watch -- --watch-poll`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid #
15 verbose cwd /mnt/_work_sdb8/wwwroot/lar/votes
16 verbose Linux 4.15.0-54-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "watch-poll"
18 verbose node v10.15.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error # watch-poll: `npm run watch -- --watch-poll`
22 error Exit status 1
23 error Failed at the # watch-poll script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
My composer.json :
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"alaouy/youtube": "^2.2",
"aloha/twilio": "^4.0",
"arrilot/laravel-widgets": "^3.12",
"cviebrock/eloquent-sluggable": "^4.5",
"davejamesmiller/laravel-breadcrumbs": "5.x",
"doctrine/dbal": "^2.8",
"elasticquent/elasticquent": "dev-master",
"facebook/graph-sdk": "^5.7",
"fideloper/proxy": "^4.0",
"google/apiclient": "^2.2",
"intervention/image": "^2.4",
"itsgoingd/clockwork": "^3.0",
"jrean/laravel-user-verification": "^7.0",
"laravel/framework": "5.8.*",
"laravel/socialite": "^3.2",
"laravel/tinker": "^1.0",
"laravelium/sitemap": "^3.1",
"maatwebsite/excel": "^3.1",
"mews/captcha": "^2.2",
"mews/purifier": "^2.1",
"paypal/rest-api-sdk-php": "*",
"proengsoft/laravel-jsvalidation": ">2.2.0",
"s-ichikawa/laravel-sendgrid-driver": "~2.0",
"snowfire/beautymail": "dev-master",
"socialiteproviders/instagram": "^3.0",
"spatie/browsershot": "^3.27",
"spatie/laravel-activitylog": "^3.1",
"spatie/laravel-backup": "^6.1",
"spatie/laravel-feed": "^2.1",
"spatie/laravel-image-optimizer": "^1.4",
"spatie/laravel-newsletter": "^4.2",
"spatie/laravel-sitemap": "^5.3",
"spatie/laravel-tags": "^2.1",
"spipu/html2pdf": "^5.2",
"themsaid/laravel-mail-preview": "^2.0",
"unisharp/laravel-filemanager": "^1.9",
"wboyz/laravel-enum": "^0.2.1",
"willvincent/feeds": "1.1.*",
"yajra/laravel-datatables-oracle": "^9.0.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.1",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"orangehill/iseed": "^2.6",
"phpunit/phpunit": "^7.0",
"xethron/migrations-generator": "^2.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
],
"post-update-cmd": [
"php artisan vendor:publish --provider=\"Proengsoft\\JsValidation\\JsValidationServiceProvider\" --tag=public --force"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
package.json:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.19.0",
"bootstrap": "^4.3.1",
"cross-env": "^5.1",
"laravel-mix": "^4.0.16",
"lodash": "^4.17.11",
"popper.js": "^1.14.6",
"vue": "^2.5.7"
},
"dependencies": {
"bootstrap-colorpicker": "^3.1.2",
"datatables.net-bs": "^1.10.19",
"font-awesome": "^4.7.0",
"jquery": "^3.4.1",
"jquery-confirm": "^3.3.2",
"laravel-echo": "^1.5.2",
"mustache": "^2.3.0",
"node-sass": "^4.12.0",
"pusher-js": "^4.3.1"
}
}
Also I commented all pusher vars in .env file.
I deleted and recreated vendor and node_modules dirs...
I do not know is this error related to cleraring of packeges ?
Why error and how to fix it?
I believe you just need to run npm install vue-template-compiler --dev

Error during "make all" in Caffe

I had an error after running the make all command while compiling Caffe. Here is what I got (it is a snippet):
CXX .build_release/src/caffe/proto/caffe.pb.cc
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
CXX/LD -o .build_release/tools/caffe.bin
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::~CodedInputStream()'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::default_recursion_limit_'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::BytesUntilLimit() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::GoogleOnceInitImpl(int*, google::protobuf::Closure*)'
collect2: ld devolvió el estado de salida 1
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1
make: *** Se espera a que terminen otras tareas....
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::~CodedInputStream()'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::default_recursion_limit_'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::BytesUntilLimit() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::GoogleOnceInitImpl(int*, google::protobuf::Closure*)'
collect2: ld devolvió el estado de salida 1
make: *** [.build_release/tools/caffe.bin] Error 1
How can I fix this issue?
EDIT: I'm installing it in Ubuntu 12.04.
comment out line 113 in
/usr/local/cuda/include/host_config.h.
it is because gcc 5 error

During the installation of CLHEP, I got an error like : Undefined symbols for architecture x86_64:

I got an error when I installed CLHEP and typed 'make' like this:
Undefined symbols for architecture x86_64:
"CLHEP::HepVector::num_row() const", referenced from:
CLHEP::HepRandomVector::operator()() in RandomVector.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libCLHEP-RandomObjects-2.1.4.1.dylib] Error 1
make[1]: *** [RandomObjects/src/CMakeFiles/RandomObjects.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 99%] Building CXX object RandomObjects/src/CMakeFiles/RandomObjectsS.dir/RandomVector.cc.o
[ 99%] Built target ExceptionsS
Linking CXX static library ../../lib/libCLHEP-RandomObjects-2.1.4.1.a
[ 99%] Built target RandomObjectsS
Linking CXX executable testInstanceRestore
[ 99%] Built target testInstanceRestore
make: *** [all] Error 2
Can you help me figure out what's wrong?
Check out the solution posted here
--- CLHEP/Matrix/src/Vector.cc.orig 2014-04-01 09:21:25.000000000 +0200
+++ CLHEP/Matrix/src/Vector.cc 2014-04-01 09:22:17.000000000 +0200
## -114,9 +114,9 ##
// trivial methods
-inline int HepVector::num_row() const {return nrow;}
-inline int HepVector::num_size() const {return nrow;}
-inline int HepVector::num_col() const { return 1; }
+int HepVector::num_row() const {return nrow;}
+int HepVector::num_size() const {return nrow;}
+int HepVector::num_col() const { return 1; }

Makefile - how to fix libc dependency?

I want to statically link Tk into my code. I am running into trouble due to dependencies. The modification I made to my Makefile is:
TK_LIBS_64 = \
-L/usr/X11R6/lib64 \
-lX11 \
-lXss \
-lXext \
-L/usr/X11R6/lib64 \
-lXft \
-lX11 \
-lfontconfig \
-lfreetype \
-lxmlparse \
-lexpat \
-L/usr/X11R6/lib64 \
-lXrender \
-lpthread \
-ldl \
-lpthread \
-lieee \
-lm
LIBS64 = \
-L$(TCL_ROOT)/lib/ -ltk8.5 \
$(TK_LIBS_64)
I get the following error on compilation:
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x7f): In function `__pthread_initialize_minimal':
: undefined reference to `__libc_setup_tls'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x86): In function `__pthread_initialize_minimal':
: undefined reference to `_dl_cpuclock_offset'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0xc0): In function `__pthread_initialize_minimal':
: undefined reference to `_errno'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0xcb): In function `__pthread_initialize_minimal':
: undefined reference to `_h_errno'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x289): In function `pthread_initialize':
: undefined reference to `_res'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x3cc): In function `pthread_initialize':
: undefined reference to `_dl_init_static_tls'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x947): In function `__pthread_reset_main_thread':
: undefined reference to `_errno'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x955): In function `__pthread_reset_main_thread':
: undefined reference to `_h_errno'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x963): In function `__pthread_reset_main_thread':
: undefined reference to `_res'
/usr/lib/../lib64/libpthread.a(ptw-write.o)(.text+0x1a): In function `write':
: undefined reference to `__syscall_error'
/usr/lib/../lib64/libpthread.a(ptw-write.o)(.text+0x72): In function `write':
: undefined reference to `__syscall_error'
/usr/lib/../lib64/libpthread.a(ptw-read.o)(.text+0x1a): In function `read':
: undefined reference to `__syscall_error'
/usr/lib/../lib64/libpthread.a(ptw-read.o)(.text+0x72): In function `read':
: undefined reference to `__syscall_error'
/usr/lib/../lib64/libpthread.a(ptw-close.o)(.text+0x1a): In function `close':
: undefined reference to `__syscall_error'
/usr/lib/../lib64/libpthread.a(ptw-close.o)(.text+0x5e): more undefined references to `__syscall_error' follow
/usr/lib/../lib64/libdl.a(dlopen.o)(.text+0x5): In function `dlopen':
: undefined reference to `__dlopen'
/usr/lib/../lib64/libdl.a(dlsym.o)(.text+0x5): In function `dlsym':
: undefined reference to `__dlsym'
/usr/lib/../lib64/libdl.a(dlerror.o)(.text+0x1): In function `dlerror':
: undefined reference to `__dlerror'
collect2: ld returned 1 exit status
*** Error code 1
dmake: Fatal error: Command failed for target
The undefined references are either in libc.a or libc_p.a and adding them to the dependencies does not help. Since the undefined references are system calls I think I am missing something basic here. I would be obliged if someone can point out the mistake.
use -pthread instead of -lpthread

Resources