Support Forums

[Netlify build] [Typescript] no loaders are configured to process this file type

PLEASE help us help you by writing a good post!

*My site: ghappy-neumann-adbd49.netlify.app

Error detail: I’m using puppeteer + chrome-aws-lambda for my side-project but some how when i run netlify build i get no loaders are configured to process this file type error when using ts-loader
The log build of netlify build

Enviroment : Ubuntu LTS 20.04

  Netlify Build                                                 

❯ Version
  @netlify/build 15.2.2

❯ Flags
  dry: false
  offline: false

❯ Current directory

❯ Config file
  No config file was defined: using default values.

❯ Context

❯ Installing plugins
   - @netlify/plugin-nextjs@3.6.3

❯ Loading plugins
   - @netlify/plugin-nextjs@3.6.3 from Netlify app

  1. onPreBuild command from @netlify/plugin-nextjs             

Using Next.js 11.0.1
info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
No Next.js cache to restore.

(@netlify/plugin-nextjs onPreBuild completed in 611ms)

  2. Build command from Netlify app                             

$ yarn run build
yarn run v1.22.10
warning ../../package.json: No license field
$ next build
info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
info  - Checking validity of types  
(node:12318) [DEP_WEBPACK_CHUNK_HAS_ENTRY_MODULE] DeprecationWarning: Chunk.hasEntryModule: Use new ChunkGraph API
(Use `node --trace-deprecation ...` to show where the warning was created)
info  - Creating an optimized production build  
Failed to compile.

Module parse failed: Unexpected token (1:10)
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

> Build error occurred
Error: > Build failed because of webpack errors
    at /home/hoangtho/Desktop/stupid-fetcher/node_modules/next/dist/build/index.js:15:924
    at async Span.traceAsyncFn (/home/hoangtho/Desktop/stupid-fetcher/node_modules/next/dist/telemetry/trace/trace.js:6:584)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

  "build.command" failed                                        

  Error message
  Command failed with exit code 1: yarn run build

  Error location
  In Build command from Netlify app:
  yarn run build

  Resolved config
    command: yarn run build
    commandOrigin: ui
    publish: /home/hoangtho/Desktop/stupid-fetcher/out
    publishOrigin: ui
    '*': {}
    - inputs: {}
      origin: ui
      package: '@netlify/plugin-nextjs'

   │                                                        │
   │    Please update netlify-cli to its latest version.    │
   │     If netlify-cli is already the latest version,      │
   │   please update your dependencies lock file instead.   │
   │                                                        │


const path = require( 'path' );
module.exports = {

    mode: 'production',
    entry: '.pages/api/index.ts',
    output: {
        path: path.resolve( __dirname, 'dist' ),
        filename: 'main.js',
    resolve: {
        extensions: [ '.ts', '.js' ],
    // loaders
    module: {
        rules: [
                test: /\.tsx?/,
                use: 'ts-loader',
                exclude: /node_modules/,

hi there, sorry to be slow to reply. We’re still hoping to get you some more information on this! thanks for your patience.

Hi @hoangtho1997,

Is it possible for you to share the source code? It looks like Webpack is trying to parse the source map with (or instead of) the actual TS file. Thus, it says it needs more loaders.

1 Like

Im so sorry for late reponse. Really sad that i delelted the source code of my github already . and i switched to another method. So how can i close the topic ?

No action needed on your part to close the topic. You can leave it unanswered, we’d take it from here.