Closed Nvironmental closed 3 years ago
@Nvironmental What do your Vercel runtime logs say?
My apologies, I couldnt find Runtime Logs.
However, I found this, I don't know if this is the same
Following is my build logs
21:09:19.419 | Cloning github.com/Nvironmental/thelatitude (Branch: staging, Commit: 5fc2961)
-- | --
21:09:20.757 | Cloning completed: 1.338s
21:09:20.793 | Analyzing source code...
21:09:20.801 | Warning: Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
21:09:22.219 | Installing build runtime...
21:09:25.203 | Build runtime installed: 2.984s
21:09:27.988 | Looking up build cache...
21:09:28.438 | Build cache found. Downloading...
21:09:33.476 | Build cache downloaded [84.44 MB]: 5038.143ms
21:09:34.584 | [log] Running with @nuxt/vercel-builder version 0.21.3
21:09:34.584 | [log] ----------------- Prepare build -----------------
21:09:34.584 | [log] Downloading files...
21:09:34.584 | [log] Working directory: /vercel/path0
21:09:34.587 | [log] Using yarn
21:09:34.588 | [info] Prepare build took: 4.155229 ms
21:09:34.588 | [log] ----------------- Install devDependencies -----------------
21:09:34.588 | [log] Using cached node_modules_dev
21:09:34.951 | yarn install v1.22.10
21:09:35.035 | [1/5] Resolving packages...
21:09:35.480 | success Already up-to-date.
21:09:35.484 | Done in 0.54s.
21:09:35.496 | [info] Install devDependencies took: 908.202491 ms
21:09:35.497 | [log] ----------------- Nuxt build -----------------
21:09:35.708 | [log] Running nuxt build --standalone --no-lock --config-file "nuxt.config.js" /vercel/path0
21:09:35.896 | [warn] postcss@8.2.8 is installed but ^7.0.32 is expected
21:10:08.036 | [info] Nuxt build took: 32539.362763 ms
21:10:08.036 | [log] ----------------- Install dependencies -----------------
21:10:08.036 | [log] Using cached node_modules_prod
21:10:08.280 | yarn install v1.22.10
21:10:08.358 | [1/5] Resolving packages...
21:10:08.894 | [2/5] Fetching packages...
21:10:08.964 | [3/5] Linking dependencies...
21:10:08.965 | warning " > @tailwindcss/line-clamp@0.2.1" has unmet peer dependency "tailwindcss@>=2.0.0".
21:10:08.966 | warning " > vue-awesome-swiper@4.1.1" has unmet peer dependency "vue@2.x".
21:10:08.967 | warning "vue-phone-number-input > style-helpers > stylelint-order@4.1.0" has unmet peer dependency "stylelint@^10.0.1 \|\| ^11.0.0 \|\| ^12.0.0 \|\| ^13.0.0".
21:10:08.967 | warning " > vue-select@3.11.2" has unmet peer dependency "vue@2.x".
21:10:09.602 | [4/5] Building fresh packages...
21:10:09.841 | [5/5] Cleaning modules...
21:10:10.255 | Done in 1.98s.
21:10:10.269 | [info] Install dependencies took: 2233.249615 ms
21:10:10.270 | [log] ----------------- Collect artifacts -----------------
21:10:15.164 | [info] Collect artifacts took: 4893.813294 ms
21:10:16.068 | Uploading build outputs...
21:10:16.340 | Deploying build outputs...
21:10:23.761 | Build completed. Populating build cache...
21:10:23.762 | [log] ----------------- Collect cache -----------------
21:10:29.724 | [info] 261 files collected from .nuxt
21:10:37.133 | [info] 27351 files collected from .vercel_cache
21:10:44.160 | [info] 26252 files collected from node_modules_dev
21:10:50.326 | [info] 5811 files collected from node_modules_prod
21:10:50.331 | [info] Collect cache took: 26568.804834 ms
21:11:08.407 | Uploading build cache [84.43 MB]...
21:11:11.859 | Build cache uploaded: 3.451s
21:11:12.380 | Done with "nuxt.config.js"
@Nvironmental That's the one! Looks like you'll need to update your lockfile (try deleting yarn.lock
and reinstalling). Indeed, I strongly suspect you would have the same issue building & running locally.
Thanks a lot @danielroe ... deleting yarn.lock
and reinstalling did work for me.
It however introduces a new errors. One is that it reads Cold Start
and the important one is that its unable to find any static assets (from static
folder) and on the site these static images/videos arent displayed.
Should I be adding static
folder explicitly in the vercel.json
like :
"config": { "serverFiles": ["package.json", "static/**"] }
Would this be correct ?
@Nvironmental You shouldn't need to add your static folder to the deployment. Cold start
is telling you how long it took to load your serverless function. You could try clicking into those logs to see why it's failing, but I can't tell from the screenshot...
Hi there,
I am trying deploy website on to Vercel, the static works fine, however whenever I try to do a server setup it fails with this message.
What I am trying to do is invoke an api call via
nuxtServerInit
Here is what config I am trying:
vercel.json
configpackage.json
filenuxt.config.js
fileTrip Store file
Store Index file where nuxtServerInit is called
After trips are fetched trips pages are fetched like
I have tried many times and also gone through previous issues but couldnt find anything how I could resolve my issue. Kindly help.