question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command failed with exit code 1: node_modules/.bin/next build

See original GitHub issue

I have made a few frontend changes to the project and was trying to deploy my code as usual using the npx serverless command but it fails with the following error. My node version: v14.17.0 and npm version: 6.14.6

13s » ireadifyweb » Error: Command failed with exit code 1: node_modules/.bin/next build warn - Invalid next.config.js options detected:

  • The root value has an unexpected property, target, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, future, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, staticPageGenerationTimeout, swcMinify, trailingSlash, typescript, useFileSystemPublicRoutes, webpack).

See more info here: https://nextjs.org/docs/messages/invalid-next-config warn - The target config is deprecated and will be removed in a future version. See more info here https://nextjs.org/docs/messages/deprecated-target-config warn - No ESLint configuration detected. Run next lint to begin setup Failed to compile.

./node_modules/@aws-amplify/graphql-transformer-interfaces/src/index.ts:2:10 Type error: Re-exporting a type when the ‘–isolatedModules’ flag is provided requires using ‘export type’.

1 | export * from ‘./transformer-context’;

2 | export { TransformerPluginProvider, TransformerPluginType } from ‘./transformer-plugin-provider’; | ^ 3 | export { 4 | MutationFieldType, 5 | QueryFieldType,

Build error occurred Error: Call retries were exceeded at ChildProcessWorker.initialize (D:\ireadify\node_modules\next\dist\compiled\jest-worker\index.js:1:11661) at ChildProcessWorker._onExit (D:\ireadify\node_modules\next\dist\compiled\jest-worker\index.js:1:12599) at ChildProcess.emit (events.js:376:20) at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) { type: ‘WorkerError’ } info - Linting and checking validity of types… bug

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
anonmilycommented, Aug 31, 2022

Getting this same error as well on AWS Amplify too

0reactions
dana-ciocancommented, Sep 13, 2022

@davidrhoderick thanks for the tip - I had a look at the error displayed after the target warning and found a note about Terser - turns out our version of terser-webpack-plugin was out of date and causing issues

Agree that it’s misleading having that warning display first

Read more comments on GitHub >

github_iconTop Results From Across the Web

next.js deployment failed on amplify - Stack Overflow
I am trying to deploy my Next.js application to AWS amplify but it is failing like this some unknown mongodb error showing which...
Read more >
Build command failed with exit code 1 - Netlify Support Forums
I have build errors which i didn't have before in previous deploys, although my webpack config hasn't changed. Also my previous deploys ...
Read more >
Next.js build is failing - Render community
My Nextjs build keeps failing, although it works fine locally. My error logging shows the following: Jun 22 05:07:47 PM > Build error...
Read more >
npm ERR! code 1 command failed [npm install error Solved]
If the error is not resolved, try to delete your node_modules and package-lock.json (not package.json ) files, rerun npm install and restart your...
Read more >
the request of a dependency is an expression nextjs - You.com
npx serverless error: Error: Command failed with exit code 1: node_modules/.bin/next build warn - Invalid next.config.js options detected: - The root value ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found