error upgrading to latest version #1067

Closed
opened 2025-08-09 17:18:45 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @lucamorelli on 1/31/2017

Hi, a few days I updated a project using the template from the yo generator 0.7.4, and I was able to run my project using csproj format.
Now I updated the project using the 0.8.0 template, but I'm facing an issue:
I updated using the ts.config, package.json, the .csproj file, and both the webpack config files, adding just a few alias like these:

            alias: {
                ditta: path.resolve(__dirname, './ClientApp/app/ditta'),
                campagna: path.resolve(__dirname, './ClientApp/app/campagna'),
                tabella: path.resolve(__dirname, './ClientApp/app/tabella'),
                contatto: path.resolve(__dirname, './ClientApp/app/contatto'),
                attivita: path.resolve(__dirname, './ClientApp/app/attivita')
            }

I deleted the node_module dir to reinstall the correct version of the package, but if I try to run webpack (when I have problems I run for command line to better understand) I obtain

import { StorageService } from './common/Storage/StorageService';

    ERROR in ./ClientApp/app/common/Storage/StorageService.ts
    Module build failed: Error: Final loader didn't return a Buffer or String

import { dittaComponents, dittaServices, dittaRoutes } from 'ditta';

    ERROR in ./ClientApp/app/ditta/index.ts
    Module build failed: Error: Final loader didn't return a Buffer or String

all these are imports in the app.module.ts file

this is the ending part of the message

        at D:\Sorgenti\Interno\MyCrm - Copia\src\CrmApp\node_modules\awesome-typescript-loader\src\index.ts:91:13
        at process._tickCallback (internal/process/next_tick.js:103:7)
     @ ./ClientApp/app/app.module.ts 25:23-65
     @ ./ClientApp/boot-client.ts

To make happy vs I added this to the tsconfig to be able to resolve the alias

    "baseUrl": ".",
    "paths": {
      "ditta": [ "clientApp/app/ditta" ],
      "campagna": [ "clientApp/app/campagna" ],
      "tabella": [ "clientApp/app/tabella" ],
      "contatto": [ "clientApp/app/contatto" ],
      "attivita": [ "clientApp/app/attivita" ]
    }

and so far the double configuration worked fine without problems, but I suppose that this is giving problems with the awesome-typescript-loader.
Do you have any suggestion to solve this problem?

*Originally created by @lucamorelli on 1/31/2017* Hi, a few days I updated a project using the template from the yo generator 0.7.4, and I was able to run my project using csproj format. Now I updated the project using the 0.8.0 template, but I'm facing an issue: I updated using the **ts.config, package.json, the .csproj file, and both the webpack config files,** adding just a few alias like these: ``` alias: { ditta: path.resolve(__dirname, './ClientApp/app/ditta'), campagna: path.resolve(__dirname, './ClientApp/app/campagna'), tabella: path.resolve(__dirname, './ClientApp/app/tabella'), contatto: path.resolve(__dirname, './ClientApp/app/contatto'), attivita: path.resolve(__dirname, './ClientApp/app/attivita') } ``` I deleted the node_module dir to reinstall the correct version of the package, but if I try to run webpack (when I have problems I run for command line to better understand) I obtain **import { StorageService } from './common/Storage/StorageService';** ``` ERROR in ./ClientApp/app/common/Storage/StorageService.ts Module build failed: Error: Final loader didn't return a Buffer or String ``` **import { dittaComponents, dittaServices, dittaRoutes } from 'ditta';** ``` ERROR in ./ClientApp/app/ditta/index.ts Module build failed: Error: Final loader didn't return a Buffer or String ``` all these are imports in the **app.module.ts** file this is the ending part of the message ``` at D:\Sorgenti\Interno\MyCrm - Copia\src\CrmApp\node_modules\awesome-typescript-loader\src\index.ts:91:13 at process._tickCallback (internal/process/next_tick.js:103:7) @ ./ClientApp/app/app.module.ts 25:23-65 @ ./ClientApp/boot-client.ts ``` To make happy vs I added this to the **tsconfig** to be able to resolve the alias ``` "baseUrl": ".", "paths": { "ditta": [ "clientApp/app/ditta" ], "campagna": [ "clientApp/app/campagna" ], "tabella": [ "clientApp/app/tabella" ], "contatto": [ "clientApp/app/contatto" ], "attivita": [ "clientApp/app/attivita" ] } ``` and so far the double configuration worked fine without problems, but I suppose that this is giving problems with the awesome-typescript-loader. Do you have any suggestion to solve this problem?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1067
No description provided.