Command failed with exit code 1: node_modules/.bin/next build
See original GitHub issueI 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…
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top GitHub Comments
Getting this same error as well on AWS Amplify too
@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 ofterser-webpack-plugin
was out of date and causing issuesAgree that it’s misleading having that warning display first