Upload file on server error in Next js on vercel [duplicate] - next.js

This question already has answers here:
How can i upload file using formidable with nextjs on vercel
(3 answers)
Closed 1 year ago.
I want to upload image on server.
My code works well on localhost and when I want to use it on vercel blow error happens.
2021-09-20T15:33:39.427Z 58fb3aa3-54bb-464e-8a68-fb876ded6cdc ERROR Error: EROFS: read-only file system, mkdir '/var/task/public'
at Object.mkdirSync (fs.js:1009:3)
at sync (/var/task/node_modules/mkdirp/index.js:72:13)
at Function.sync (/var/task/node_modules/mkdirp/index.js:78:24)
at new DiskStorage (/var/task/node_modules/multer/storage/disk.js:21:12)
at Function.module.exports [as diskStorage] (/var/task/node_modules/multer/storage/disk.js:65:10)
at Object.2439 (/var/task/.next/server/pages/api/uploads.js:32:38)
at __webpack_require__ (/var/task/.next/server/webpack-runtime.js:25:42)
at __webpack_exec__ (/var/task/.next/server/pages/api/uploads.js:102:52)
at /var/task/.next/server/pages/api/uploads.js:103:28
at Object.<anonymous> (/var/task/.next/server/pages/api/uploads.js:106:3) {
errno: -30,
syscall: 'mkdir',
code: 'EROFS',
path: '/var/task/public'
}
RequestId: 58fb3aa3-54bb-464e-8a68-fb876ded6cdc Error: Runtime exited with error: exit status 1
Runtime.ExitError

Local is different then Vercel, Vercel serverless functions that doesn't support file upload from browser.
File Storage & Uploads

Related

Nextjs not compiling after changes in code, throws -4094 unknow error

Nextjs stucks at compiling all of a sudden i do not know why. I change something in code and save then it stucks at compiling, when i refresh the page it throws internal server error.
[Error: UNKNOWN: unknown error, open 'C:\Users\Omer\stateskop-deployment\src\client\.next\build-manifest.json'] {
errno: -4094,
code: 'UNKNOWN',
syscall: 'open',
path: 'C:\\Users\\Omer\\stateskop-deployment\\src\\client\\.next\\build-manifest.json'
}
I serve my app with Nestjs backend, i think this problem started after i implemented localization with next-translate. I deleted every file relevant to that but still couldnt fix the problem and i have no idea why this problem occurs

dyld: Symbol not found: _SecTrustEvaluateWithError

I'm on MacPro OS 10.12 (can not be upgraded to 10.13 or beyond bc HW is old!) and I get below error.
Any help please
Thanks
Task start deno run -A --watch=static/,routes/ dev.ts
Watcher Process started.
The manifest has been generated for 3 routes and 1 islands.
Server listening on http://localhost:3000
dyld: Symbol not found: _SecTrustEvaluateWithError
Referenced from: /Users/kemalgencay/Library/Caches/esbuild/bin/esbuild-darwin-
64#0.14.39
Expected in: flat namespace
An error occured during route handling or page rendering. Error: The service was
stopped
at https://deno.land/x/esbuild#v0.14.39/mod.js:1304:25
at https://deno.land/x/esbuild#v0.14.39/mod.js:633:9
at afterClose (https://deno.land/x/esbuild#v0.14.39/mod.js:611:7)
at https://deno.land/x/esbuild#v0.14.39/mod.js:1844:11
error: Uncaught (in promise) BrokenPipe: Broken pipe (os error 32)
Watcher Process finished. Restarting on file change...
"devDependencies": {
"esbuild-wasm":"latest"
},
"overrides": {
"esbuild":"npm:esbuild-wasm#latest"
}
Just add this to the package.json
And then run: npm install
Hope it helps!

expo and firestore, unhandled promise rejection: typeError

I have been getting this error for the last two days now.
This happened after I installed a node module named "faker". What I've found out until now is that npm 5 deleted any packages from the package.lock.json that were not installed using npm 5.
Hence I deleted node modules and the package.lock.json and did an npm install, it didn't help.
I created a separate expo project and copied the files over to it from the old project and installed every module again, it still does not work.
Below is the error I am getting:
[15:18:35] [Unhandled promise rejection: TypeError: undefined is not a function (evaluating 'collection[typeof Symbol === "function" ? Symbol.iterator : "##iterator"]()')]
- node_modules/#firebase/firestore/dist/index.cjs.js:8293:17 in forEach
- node_modules/#firebase/firestore/dist/index.cjs.js:13322:42 in onTransactionCommitted
- ... 52 more stack frames from framework internals

Meteor Up (Mup) deployment error

I am trying to deploy a Meteor project using Mup. Mup Setup worked fine, but when i used the command Mup Deploy i get the following error below:
(Note: I have tried multiple appPaths but i have found no solution)
Meteor Up: Production Quality Meteor Deployments
“ Checkout Kadira!
It's the best way to monitor performance of your app.
Visit: https://kadira.io/mup ”
Building Started: /srv/asm/
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1011:11)
at Process.ChildProcess._handle.onexit (child_process.js:802:34)
Fixed. In order to correct this error i double checked app path:
// Location of app (local directory)
"app": "/srv/asm/",
and uninstalled Meteor, then reinstalled meteor, then ran mup deploy. All is now working correctly.

Error in deploy my application Symfony [duplicate]

This question already has answers here:
Moving app to production mode in Symfony 2
(5 answers)
Closed 8 years ago.
I am trying to deploy my code on the server.
I followed these steps:
clear cache
update vendor
add configuration of my remote database
change the value of access cache and log
But I'm getting this error:
Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException' with message 'You have requested a non-existent parameter "kernel.debug".' in /home/public_html/demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:106
Stack trace: #0 /home/public_html/demo/app/bootstrap.php.cache(1959): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->get('kernel.debug')
#1 /home/public_html/demo/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php(85): Symfony\Component\DependencyInjection\Container->getParameter('kernel.debug')
#2 /home/public_html/demo/app/bootstrap.php.cache(2562): Symfony\Bundle\FrameworkBundle\FrameworkBundle->build(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#3 /home/public_html/demo/app/bootstrap.php.cache(2542): Symfony\Component\HttpKernel\Kernel->prepareContainer(Object(Symfony\Component\DependencyInjection\ContainerBuilde in /home/public_html/demo/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php on line 106
As you can see, this error is being thrown in bootstrap.php.cache.
Symfony uses a bootstrap file to improve class loading performance, as documented here. However, you presumably copied this file over from your development environment, and it hasn't yet been regenerated for production.
You will need to regenerate this file either by running composer install or by running the build script directly: php ./vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php

Resources