Need help fixing NX build error. Using NextJS App router, NX for this project
Budget: €8 – €30 EUR
I am looking for a developer who can provide a permanent solution to a build error in my NextJS app using NX. I have the specific error message that I can provide for reference. I do not require any additional assistance beyond fixing the build error.
Ideal Skills and Experience:
- Strong expertise in NextJS and NX
- Experience in troubleshooting and resolving build errors
- Solid understanding of web development technologies and best practices
The error message:
> nx run frontend:build:production
- info Creating an optimized production build...
Failed to compile.
../../libs/api-hooks/src/lib/providers.tsx
Module parse failed: Unexpected token (3:14)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| 'use client';
|
> import { type ReactNode, useState } from 'react';
| import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
| import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental';
Import trace for requested module:
../../libs/api-hooks/src/lib/providers.tsx
../../libs/api-hooks/src/lib/useAuthors/index.tsx
Module parse failed: The keyword 'interface' is reserved (7:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { getBaseAdminUrl, getBaseUrl } from '../api';
|
> interface AuthorInput {
| firstName: string;
| lastName: string;
Import trace for requested module:
../../libs/api-hooks/src/lib/useAuthors/index.tsx
../../libs/api-hooks/src/index.ts
./app/_components/SubscribeForm.tsx
../../libs/api-hooks/src/lib/useBlogs/index.tsx
Module parse failed: Unexpected token (7:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| useQueryClient,
| } from '@tanstack/react-query';
> import type { OutputData } from '@editorjs/editorjs';
|
| import type {
Import trace for requested module:
../../libs/api-hooks/src/lib/useBlogs/index.tsx
../../libs/api-hooks/src/index.ts
./app/_components/SubscribeForm.tsx
../../libs/api-hooks/src/lib/useFeedback/index.ts
Module parse failed: Unexpected token (3:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { useMutation } from '@tanstack/react-query';
|
> import type { Response } from '@emplohub/types';
|
| import { getBaseUrl } from '../api';
Import trace for requested module:
../../libs/api-hooks/src/lib/useFeedback/index.ts
../../libs/api-hooks/src/index.ts
./app/_components/SubscribeForm.tsx
../../libs/api-hooks/src/lib/useSearch/index.ts
Module parse failed: Unexpected token (3:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { useQuery } from '@tanstack/react-query';
|
> import type { SearchResponse } from '@emplohub/types';
|
| import { getBaseUrl } from '../api';
Import trace for requested module:
../../libs/api-hooks/src/lib/useSearch/index.ts
../../libs/api-hooks/src/index.ts
./app/_components/SubscribeForm.tsx
> Build failed because of webpack errors
Error occurred while trying to run the build command
1
Ideal Skills and Experience:
- Strong expertise in NextJS and NX
- Experience in troubleshooting and resolving build errors
- Solid understanding of web development technologies and best practices
The error message:
> nx run frontend:build:production
- info Creating an optimized production build...
Failed to compile.
../../libs/api-hooks/src/lib/providers.tsx
Module parse failed: Unexpected token (3:14)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| 'use client';
|
> import { type ReactNode, useState } from 'react';
| import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
| import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental';
Import trace for requested module:
../../libs/api-hooks/src/lib/providers.tsx
../../libs/api-hooks/src/lib/useAuthors/index.tsx
Module parse failed: The keyword 'interface' is reserved (7:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { getBaseAdminUrl, getBaseUrl } from '../api';
|
> interface AuthorInput {
| firstName: string;
| lastName: string;
Import trace for requested module:
../../libs/api-hooks/src/lib/useAuthors/index.tsx
../../libs/api-hooks/src/index.ts
./app/_components/SubscribeForm.tsx
../../libs/api-hooks/src/lib/useBlogs/index.tsx
Module parse failed: Unexpected token (7:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| useQueryClient,
| } from '@tanstack/react-query';
> import type { OutputData } from '@editorjs/editorjs';
|
| import type {
Import trace for requested module:
../../libs/api-hooks/src/lib/useBlogs/index.tsx
../../libs/api-hooks/src/index.ts
./app/_components/SubscribeForm.tsx
../../libs/api-hooks/src/lib/useFeedback/index.ts
Module parse failed: Unexpected token (3:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { useMutation } from '@tanstack/react-query';
|
> import type { Response } from '@emplohub/types';
|
| import { getBaseUrl } from '../api';
Import trace for requested module:
../../libs/api-hooks/src/lib/useFeedback/index.ts
../../libs/api-hooks/src/index.ts
./app/_components/SubscribeForm.tsx
../../libs/api-hooks/src/lib/useSearch/index.ts
Module parse failed: Unexpected token (3:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { useQuery } from '@tanstack/react-query';
|
> import type { SearchResponse } from '@emplohub/types';
|
| import { getBaseUrl } from '../api';
Import trace for requested module:
../../libs/api-hooks/src/lib/useSearch/index.ts
../../libs/api-hooks/src/index.ts
./app/_components/SubscribeForm.tsx
> Build failed because of webpack errors
Error occurred while trying to run the build command
1