Vercel deployment issues (sveltekit) - web-deployment

Cloning github.com/A-childs-encyclopedia/cherrycreamcoweb (Branch: main, Commit: fa24393) Previous build cache not available Cloning completed: 605.674ms Note: Not using build cache: - can not verify whether nodejs version of build cache (<unknown>) is same as current detected version (16.x) - can not verify whether package manager of build cache (<unknown>) is same as current detected value (yarn) Running "vercel build" Vercel CLI 28.4.12-05a80a4 Installing dependencies... yarn install v1.22.17 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Saved lockfile. $ svelte-kit sync Done in 5.94s. Running "yarn run build" yarn run v1.22.17 $ svelte-kit build vite v2.9.9 building for production... transforming... 5:43:14 AM [vite-plugin-svelte] /vercel/path0/src/routes/__layout.svelte:49:2 Unused CSS selector "footer a" 47: } 48: 49: footer a { ^ 50: font-weight: bold; 51: } ✓ 28 modules transformed. rendering chunks... .svelte-kit/output/client/_app/immutable/assets/svelte-logo-0cd4a92a.svg 29.84 KiB .svelte-kit/output/client/_app/immutable/assets/fira-mono-cyrillic-ext-400-normal-3df7909e.woff2 15.40 KiB .svelte-kit/output/client/_app/immutable/assets/fira-mono-cyrillic-400-normal-c7d433fd.woff2 8.89 KiB .svelte-kit/output/client/_app/immutable/assets/fira-mono-greek-ext-400-normal-9e2fe623.woff2 7.33 KiB .svelte-kit/output/client/_app/immutable/assets/fira-mono-greek-400-normal-a8be01ce.woff2 10.27 KiB .svelte-kit/output/client/_app/immutable/assets/fira-mono-latin-ext-400-normal-6bfabd30.woff2 11.10 KiB .svelte-kit/output/client/_app/immutable/assets/fira-mono-latin-400-normal-e43b3538.woff2 15.90 KiB .svelte-kit/output/client/_app/immutable/manifest.json 2.53 KiB .svelte-kit/output/client/_app/immutable/pages/__layout.svelte-10989134.js 5.08 KiB / gzip: 1.96 KiB .svelte-kit/output/client/_app/immutable/error.svelte-061cf164.js 1.56 KiB / gzip: 0.75 KiB .svelte-kit/output/client/_app/immutable/pages/about.svelte-c628c311.js 1.63 KiB / gzip: 0.83 KiB .svelte-kit/output/client/_app/immutable/pages/index.svelte-62e0c07d.js 2.38 KiB / gzip: 1.10 KiB .svelte-kit/output/client/_app/immutable/pages/studihelper.svelte-bae06dd7.js 0.15 KiB / gzip: 0.14 KiB .svelte-kit/output/client/_app/immutable/pages/todos.svelte-2760656c.js 0.41 KiB / gzip: 0.29 KiB .svelte-kit/output/client/_app/immutable/assets/pages/index.svelte-97e7af93.css 0.37 KiB / gzip: 0.20 KiB .svelte-kit/output/client/_app/immutable/chunks/index-f1bb3661.js 7.41 KiB / gzip: 3.01 KiB .svelte-kit/output/client/_app/immutable/start-9e8311b5.js 24.21 KiB / gzip: 9.10 KiB .svelte-kit/output/client/_app/immutable/assets/pages/about.svelte-206e1d16.css 0.11 KiB / gzip: 0.10 KiB .svelte-kit/output/client/_app/immutable/assets/pages/__layout.svelte-ff93b016.css 5.09 KiB / gzip: 1.56 KiB vite v2.9.9 building SSR bundle for production... transforming... 5:43:15 AM [vite-plugin-svelte] /vercel/path0/src/routes/__layout.svelte:49:2 Unused CSS selector "footer a" 47: } 48: 49: footer a { ^ 50: font-weight: bold; 51: } ✓ 24 modules transformed. rendering chunks... .svelte-kit/output/server/manifest.json 2.29 KiB .svelte-kit/output/server/index.js 74.10 KiB .svelte-kit/output/server/entries/pages/__layout.svelte.js 4.81 KiB .svelte-kit/output/server/entries/fallbacks/error.svelte.js 0.72 KiB .svelte-kit/output/server/entries/pages/about.svelte.js 1.05 KiB .svelte-kit/output/server/entries/pages/index.svelte.js 1.62 KiB .svelte-kit/output/server/entries/pages/studihelper.svelte.js 0.21 KiB .svelte-kit/output/server/entries/pages/todos.svelte.js 0.23 KiB .svelte-kit/output/server/chunks/index-db705882.js 2.99 KiB .svelte-kit/output/server/chunks/hooks-3ad7760f.js 0.46 KiB > 404 /src/manifest.json (linked from /) at file:///vercel/path0/node_modules/#sveltejs/kit/dist/chunks/index.js:1022:11 at save (file:///vercel/path0/node_modules/#sveltejs/kit/dist/chunks/index.js:1241:4) at visit (file:///vercel/path0/node_modules/#sveltejs/kit/dist/chunks/index.js:1132:3) at processTicksAndRejections (node:internal/process/task_queues:96:5) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Error: Command "yarn run build" exited with 1
ㅤㅤㅤI expected it to deploy properly

Related

How to solveError: EPERM: operation not permitted, symlink 'contact.func' -> '\.vercel\output\functions\api\getExperience.func'?

I'm deploying a NextJs project with sanity build, and I get the following error:
Error: EPERM: operation not permitted, symlink 'contact.func' -> 'C:\Users\Arotiana's\portfolio-react\.vercel\output\functions\api\getExperience.func'
I've tried to change the authorizations on the folder, but the same error appears again
this is the whole process:
PS C:\Users\Arotiana's\portfolio-react> vercel build
Vercel CLI 28.10.1
WARNING: You should not upload the `.next` directory.
Installing dependencies...
up to date in 15s
105 packages are looking for funding
run `npm fund` for details
Detected Next.js version: 13.0.6
Detected `package-lock.json` generated by npm 7+...
Running "npm run build"
> portfolio-react#0.1.0 build
> next build
info - Linting and checking validity of types
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
[ =] info - Generating static pages (2/3)(node:5472) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
info - Generating static pages (3/3)
info - Finalizing page optimization
Route (pages) Size First Load JS
┌ ● / (14855 ms) 112 kB 185 kB
├ └ css/53a9169c96cbb4d8.css 2.2 kB
├ /_app 0 B 73.2 kB
├ ○ /404 181 B 73.4 kB
├ λ /api/contact 0 B 73.2 kB
├ λ /api/getExperience 0 B 73.2 kB
├ λ /api/getPageinfo 0 B 73.2 kB
├ λ /api/getProject 0 B 73.2 kB
├ λ /api/getSkills 0 B 73.2 kB
└ λ /api/hello 0 B 73.2 kB
+ First Load JS shared by all 77.2 kB
├ chunks/framework-3b5a00d5d7e8d93b.js 45.4 kB
├ chunks/main-f2e125da23ccdc4a.js 26.7 kB
├ chunks/pages/_app-a96cacb95f41a3ef.js 286 B
├ chunks/webpack-59c5c889f52620d6.js 819 B
└ css/bfe58de89cfcdd1e.css 3.95 kB
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
Traced Next.js server files in: 5.050s
Created all serverless functions in: 2.294s
Collected static files (public/, static/, .next/static): 518.68ms
Error: EPERM: operation not permitted, symlink 'contact.func' -> 'C:\Users\Arotiana's\portfolio-react\.vercel\output\functions\api\getExperience.func'
Help would be appreciated

Exit status 223 (out of memory) when pushing to IBM Cloud

I am running into trouble deploying apps from my local dev environment. My cf push always fails with a Exit status 223 (out of memory) error (irrespective of the app).
I am certain both my IBM Cloud Org and my local environment have sufficient space to work with.
Here is the stack trace:
REQUEST: [2018-02-14T09:02:04-05:00]
GET /v2/apps/7426064e-0d6c-469e-8d6d-01e47728be01 HTTP/1.1
Host: api.ng.bluemix.net
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Connection: close
Content-Type: application/json
User-Agent: go-cli 6.32.0+0191c33d9.2017-09-26 / darwin
10% building modules 8/17 modules 9 active ...node_modules/fbjs/lib/containsNode.js
89% additionsets processing Hash: 9d08b2614d7a87cb99ad
Version: webpack 2.7.0
js/bundle.9d08b2614d7a87cb99ad.js 297 kB 0 [emitted] [big] main
js/bundle.9d08b2614d7a87cb99ad.js.map 466 kB 0 [emitted] main
index.html 304 bytes [emitted]
[0] ./~/react/index.js 190 bytes {0} [built]
[4] ./client/app/App.jsx 858 bytes {0} [built]
[5] ./~/react-dom/index.js 1.36 kB {0} [built]
[6] ./client/default.scss 1.03 kB {0} [built]
[8] ./~/css-loader!./~/sass-loader/lib/loader.js!./client/default.scss 193 kB {0} [built]
[9] ./~/css-loader/lib/css-base.js 2.26 kB {0} [built]
[12] ./~/fbjs/lib/containsNode.js 923 bytes {0} [built]
Time: 73789ms
Asset Size Chunks Chunk Names
[7] ./client/index.jsx 222 bytes {0} [built]
[10] ./~/fbjs/lib/EventListener.js 2.25 kB {0} [built]
[11] ./~/fbjs/lib/ExecutionEnvironment.js 935 bytes {0} [built]
[13] ./~/fbjs/lib/focusNode.js 578 bytes {0} [built]
[14] ./~/fbjs/lib/getActiveElement.js 912 bytes {0} [built]
[18] ./~/react-dom/cjs/react-dom.production.min.js 92.7 kB {0} [built]
[19] ./~/react/cjs/react.production.min.js 5.41 kB {0} [built]
[20] ./~/style-loader/addStyles.js 6.91 kB {0} [built]
+ 6 hidden modules
Child html-webpack-plugin for "index.html":
[0] ./~/lodash/lodash.js 540 kB {0} [built]
[1] ./~/html-webpack-plugin/lib/loader.js!./client/index.html 590 bytes {0} [built]
[2] (webpack)/buildin/global.js 509 bytes {0} [built]
[3] (webpack)/buildin/module.js 517 bytes {0} [built]
-----> Build failed
Failed to compile droplet: Failed to compile droplet: exit status 137
Exit status 223 (out of memory)
Staging failed: STG: Exited with status 223 (out of memory)
Stopping instance 0ee88ef2-8cd4-4096-9c3c-dee1870cf758
Destroying container
Successfully destroyed container
Has anyone run into this issue? Does anyone have any ideas on what might be wrong?
Here's what you could try:
Restarting the app
Re-installing npm packages (npm install)
Updating node, npm versions
Increasing the app space on IBM Cloud
Reduce the overall memory used by the app
Looking for possible memory leaks
Possible issues with packages (webpack etc)
Here's what worked for me:
In my NodeJS package.json, I added:
"engines": {
"node": ">= 7.0.0",
"npm": ">= 4.2.0"
}
I believe the issue was with IBM Cloud's default npm version, versus the version I was using in my local environment. Once I specified the version in my package.json, IBM Cloud was able to complete the build and deploy.
If people have a better understanding of what the error was and why this solution worked, please share.
Please check your application's available memory.
and check wether your application produces any memory leak.
The quickest thing to try is :
You can increase memory allocation for your app.
Login to the Cloud's Dashboard.
Select your app and increase MEMORY QUOTA.
This will restart the app.
Try pushing again.
The error is saying that staging has failed because the process used up too much memory. In short, whatever is running is exceeding the memory limit for the staging container.
Failed to compile droplet: Failed to compile droplet: exit status 137
Exit status 223 (out of memory)
Staging failed: STG: Exited with status 223 (out of memory)
You've got three options for working around this.
Cloud Foundry will set the memory limit for the staging container to either an operator defined value or the size of the memory limit you picked for your app, whichever one is larger. I can't say what the operator defined limit is for your platform, but you can probably work around this by simply setting a larger memory limit. Just try pushing again with larger values until it succeeds. Then after the push is successful, you can cf scale -m and lower the memory limit back down to what you need for runtime.
The other option would be to take a look at your build scripts or whatever runs to stage your application, and work to reduce the memory it requires. Making it consume less memory should also resolve this issue.
Lastly, you can stage your app locally. To do this you would run your build scripts on your local machine and then push the final product. You can't skip the staging process altogether, but if things are already prepared to run then staging usually becomes a no-op.
Hope that helps!

read_feather over network drive slow

I have a data.frame of moderate size, and I tested storing and retrieving it to a network drive using both rds (uncompressed) and feather format. But the result shows that while write_feather is much faster than saveRDS, read_feather is much slower than readRDS.
Question(s). Does this have something to do with the particular network configuration of my workplace (i.e. is it just me)? or does it have something to do with the innate ability to handle remote files of read_feather and readRDS? Shall I stick to rds for now?
> print(object.size(impdata),unit="auto")
364.4 Mb
## SAVING
> system.time(feather::write_feather(impData,path="M:/waangData/test.feather"))
user system elapsed
0.52 0.16 4.80
> system.time(saveRDS(impData,file="M:/waangData/Data4predictImp.rds",compress=F))
user system elapsed
4.23 2.35 28.61
## READING
> system.time({t2=feather::read_feather("M:/waangData/test.feather")})
user system elapsed
0.59 1.54 134.39
> system.time({t=readRDS("M:/waangData/Data4predictImp.rds")})
user system elapsed
2.36 0.61 19.59

how many websites should i host on EC2 nano instance

I am developing a couple of websites, but I only have paid for an EC2 nano instance on AWS. How many websites could I possible host there, assuming the websites will only have minimum traffic? Most of the websites are for personal use only.
Only one way to find out ;)
No definite answer possible because it depends on a lot of factors.
But if traffic is really low you will only be limited by the amount of disk space and as t2.nano runs on EBS storage this can be as big as you want. So you could fit a lot of websites!
t2.nano has only 512Mb memory so best to pick a not-so-memory-hungry webserver such as ngnix.
I run five very low traffic websites on my t2 nano - four of them Wordpress, one custom PHP. I run Nginx, PHP5.6, and MySQl 5.6 on the same instance. Traffic is extremely light, in the region of 2000 pages a day, which is about a page every 30 seconds. If you include static resources it'll be higher. CloudFlare runs as the CDN, which reduces static resource consumption significantly, but doesn't cache pages.
I have MySQL on the instance configured to use very little memory, currently 141MB physical RAM. Nginx takes around 10MB RAM. I have four PHP workers, each taking 150MB RAM, but of that 130MB is shared, so it's really 20MB per worker after the first.
Here's the output of a quick performance test on the t2.nano. Note that the Nginx page cache will be serving all of the pages.
siege -c 50 -t10s https://www.example.com -i -q -b
Lifting the server siege... done.
Transactions: 2399 hits
Availability: 100.00 %
Elapsed time: 9.60 secs
Data transferred: 14.82 MB
Response time: 0.20 secs
Transaction rate: 249.90 trans/sec ***
Throughput: 1.54 MB/sec
Concurrency: 49.42
Successful transactions: 2399
Failed transactions: 0
Longest transaction: 0.36
Shortest transaction: 0.14
Here it is with nginx page caching turned off
siege -c 5 -t10s https://www.example.com -i -q -b
Lifting the server siege... done.
Transactions: 113 hits
Availability: 100.00 %
Elapsed time: 9.99 secs
Data transferred: 0.70 MB
Response time: 0.44 secs
Transaction rate: 11.31 trans/sec ***
Throughput: 0.07 MB/sec
Concurrency: 4.95
Successful transactions: 113
Failed transactions: 0
Longest transaction: 0.70
Shortest transaction: 0.33

Drush fails with ReflectionException: Class Drush\Sql\Sql7 does not have a constructor

I have followed instructions on http://docs.drush.org/en/master/install/ to install Drush (tried both global and individual options).
When I cd to the Drupal site root and type "drush status" I get the following:
Drupal version : 7.34
Site URI : http://default
PHP executable : /usr/bin/php
PHP configuration : /etc/php.ini
PHP OS : Linux
Drush script : /root/.composer/vendor/drush/drush/drush.php
Drush version : 7.0.0
Drush temp directory : /tmp
Drush configuration :
Drush alias files :
Drupal root : /var/www/site_dev
Site path : sites/default
When I type "drush cc all" I get:
No Drupal site found, only 'drush' cache was cleared.
'all' cache was cleared.
When I type "drush sqlc" I get:
exception 'ReflectionException' with message 'Class Drush\Sql\Sql7 does not have a constructor, so you cannot pass any constructor [error]
arguments' in /root/.composer/vendor/drush/drush/includes/drush.inc:113
Stack trace:
#0 /root/.composer/vendor/drush/drush/includes/drush.inc(113): ReflectionClass->newInstanceArgs(Array)
#1 /root/.composer/vendor/drush/drush/commands/sql/sql.drush.inc(605): drush_get_class('Drush\Sql\Sql', Array, Array)
#2 /root/.composer/vendor/drush/drush/commands/sql/sql.drush.inc(588): drush_sql_get_version()
#3 /root/.composer/vendor/drush/drush/commands/sql/sql.drush.inc(454): drush_sql_get_class()
#4 [internal function]: drush_sql_cli()
#5 /root/.composer/vendor/drush/drush/includes/command.inc(368): call_user_func_array('drush_sql_cli', Array)
#6 /root/.composer/vendor/drush/drush/includes/command.inc(219): _drush_invoke_hooks(Array, Array)
#7 [internal function]: drush_command()
#8 /root/.composer/vendor/drush/drush/includes/command.inc(187): call_user_func_array('drush_command', Array)
#9 /root/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(62): drush_dispatch(Array)
#10 /root/.composer/vendor/drush/drush/drush.php(70): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#11 /root/.composer/vendor/drush/drush/drush.php(11): drush_main()
#12 {main}
It strikes me that the problem has something to do with MySQL (because the status doesn't list the DB parameters), but I can't figure it out. Under sites there is only default folder, so it's not a multisite installation.
Can anyone advise what's wrong please?
UPDATE
I have upgraded PHP to 5.5.27 and reinstalled Drush 7.0.0.
Following an advice here I deleted my.cnf from the home folder and after that "drush sqlc" started to work, however when I type "drush -v -d status" it gives me:
Starting Drush preflight. [0.01 sec, 2.08 MB] [preflight]
Cache HIT cid: 7.0.0-commandfiles-0-81cc86c1995ab7206f383ec28ad43baf [0.01 sec, 2.14 MB] [debug]
Bootstrap to phase 0. [0.07 sec, 6.08 MB] [bootstrap]
Drush bootstrap phase : bootstrap_drupal_root() [0.08 sec, 6.43 MB] [bootstrap]
Initialized Drupal 7.34 root directory at /var/www/site_dev [0.08 sec, 6.43 MB] [notice]
Find command files for phase 1 (max=7) [0.08 sec, 4.48 MB] [debug]
Cache HIT cid: 7.0.0-commandfiles-1-a0882f4af91e1d6b72794cc62bb1b558 [0.08 sec, 4.49 MB] [debug]
Drush bootstrap phase : bootstrap_drupal_site() [0.08 sec, 4.49 MB] [bootstrap]
Initialized Drupal site default at sites/default [0.08 sec, 4.5 MB] [notice]
Find command files for phase 2 (max=7) [0.09 sec, 4.5 MB] [debug]
Cache HIT cid: 7.0.0-commandfiles-2-f17fc6bdab2f74278df75194ca483893 [0.09 sec, 4.5 MB] [debug]
Drush bootstrap phase : bootstrap_drupal_configuration() [0.09 sec, 4.5 MB] [bootstrap]
Find command files for phase 3 (max=7) [0.09 sec, 4.51 MB] [debug]
sql-query: SELECT 1; [0.09 sec, 4.62 MB] [status]
Executing: mysql --defaults-extra-file=/tmp/drush_CKiVHd --database=site_dev --host=localhost --silent < /tmp/drush_DG1fIs
1
Drush bootstrap phase : bootstrap_drupal_database() [0.1 sec, 4.62 MB] [bootstrap]
Successfully connected to the Drupal database. [0.11 sec, 5.13 MB] [bootstrap]
Find command files for phase 4 (max=7) [0.11 sec, 5.13 MB] [debug]
Drush bootstrap phase : bootstrap_drupal_full() [0.11 sec, 5.13 MB] [bootstrap]
Cannot modify header information - headers already sent by (output started at /root/.composer/vendor/drush/drush/includes/output.inc:38)[warning]
common.inc:698 [0.96 sec, 31.9 МБ]
Drush command terminated abnormally due to an unrecoverable error.
Sounds like it could be this issue: 7.x does not work with PHP 5.3.3.
There is a solution provided in this comment:
The base class SqlVersion class does not have a constructor and yet an
empty array is passed into its descendant (Sql6 or Sql7).
To workaround this, the line:
return $reflectionClass->newInstanceArgs($constructor_args);
should be replaced with:
return !empty($constructor_args) ?
$reflectionClass->newInstanceArgs($constructor_args) :
$reflectionClass->newInstanceArgs();
Alternatively you can upgrade PHP v5.4 or higher.
Or, you can downgrade Drush to 6.x.
If you're running this site in your local (dev) environment (hard to tell from the question ...)
then try changing the database host in Drupal's settings.php file from "localhost" to "127.0.0.1".
If you're working on Windows, you need to verify that your PATH Variable for MYSQL is properly set. I had the problem when I had upgraded my WAMP.
Example like this : C:\wamp\bin\mysql\mysql5.6.17\bin

Resources