NextJs SSR APP Deployment Error "Exit code 0"

I am trying to deploy my nextjs ssr application, and i keep getting some few errors, and an “exit code 0”

error log:

17:35:36.041	Cloning repository...
17:35:37.509	From https://github.com/ORG/SSR-APP-UI-Nextjs
17:35:37.509	 * branch            dcf58986a99c30becd2bc96d97c8860a190853c2 -> FETCH_HEAD
17:35:37.510	
17:35:37.715	HEAD is now at dcf5898 add yarn.lock
17:35:37.716	
17:35:37.834	
17:35:37.872	Success: Finished cloning repository files
17:35:38.712	Detected the following tools from environment: [email protected], [email protected]
17:35:38.713	Installing project dependencies: yarn
17:35:39.510	➤ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker 👍
17:35:39.511	
17:35:39.658	➤ YN0000: ┌ Resolution step
17:35:40.387	➤ YN0061: │ @babel/plugin-proposal-private-property-in-object@npm:7.21.11 is deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.
17:35:40.856	➤ YN0032: │ sharp@npm:0.32.5: Implicit dependencies on node-gyp are discouraged
17:35:40.937	➤ YN0061: │ memoize-one@npm:4.1.0 is deprecated: New custom equality api does not play well with all equality helpers. Please use v5.x
17:35:41.646	➤ YN0032: │ node-addon-api@npm:6.1.0: Implicit dependencies on node-gyp are discouraged
17:35:44.486	➤ YN0032: │ fsevents@npm:2.3.3: Implicit dependencies on node-gyp are discouraged
17:35:45.468	➤ YN0061: │ @babel/plugin-proposal-class-properties@npm:7.18.6 is deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
17:35:45.491	➤ YN0061: │ sourcemap-codec@npm:1.4.8 is deprecated: Please use @jridgewell/sourcemap-codec instead
17:35:45.534	➤ YN0061: │ @babel/plugin-proposal-object-rest-spread@npm:7.20.7 is deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
17:35:55.364	➤ YN0002: │ SSR-APP-UI-Nextjs@workspace:. doesn't provide @babel/core (pc91a6), requested by @babel/plugin-proposal-private-property-in-object
17:35:55.365	➤ YN0002: │ SSR-APP-UI-Nextjs@workspace:. doesn't provide @testing-library/dom (pcb078), requested by @testing-library/user-event
17:35:55.366	➤ YN0002: │ SSR-APP-UI-Nextjs@workspace:. doesn't provide babel-plugin-macros (p33833), requested by @lingui/macro
17:35:55.366	➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
17:35:55.370	➤ YN0000: └ Completed in 15s 712ms
17:35:55.455	➤ YN0000: ┌ Post-resolution validation
17:35:55.455	➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.
17:35:55.455	➤ YN0000: └ Completed
17:35:55.455	➤ YN0000: Failed with errors in 15s 798ms
17:35:55.533	Error: Exit with error code: 1
17:35:55.533	    at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
17:35:55.533	    at Object.onceWrapper (node:events:652:26)
17:35:55.534	    at ChildProcess.emit (node:events:537:28)
17:35:55.534	    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
17:35:55.541	Failed: build command exited with code: 1
17:35:56.544	Failed: error occurred while running build command

Are you using the right Yarn version?

yeah, i think so!. using yarn v1.22.19

The build is running Yarn 3
Set YARN_VERSION env var to 1 to use Yarn 1

2 Likes

Thanks it did work, but i got this error again!:

20:19:49.721	λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
20:19:49.722	○  (Static)  automatically rendered as static HTML (uses no initial props)
20:19:49.722	●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
20:19:49.722	
20:19:49.921	Finished
20:19:49.922	Note: No functions dir at /functions found. Skipping.
20:19:49.922	Validating asset output directory
20:19:49.922	Error: Output directory ".vercel/output/static" not found.
20:19:51.702	Failed: build output directory not found

i know it’s a directory related issue, so will it the the out dir or the .next directory

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.