angular2-template-loader icon indicating copy to clipboard operation
angular2-template-loader copied to clipboard

DeprecationWarning from loaderUtils

Open unlight opened this issue 7 years ago • 3 comments
trafficstars

[email protected]
+-- [email protected]
| `-- [email protected]
(node:6856) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
    at Object.parseQuery (c:\Dev\sso\frontend.admin\node_modules\loader-utils\index.js:78:3)
    at Object.module.exports (c:\Dev\sso\frontend.admin\node_modules\angular2-template-loader\index.js:21:27)

unlight avatar Oct 24 '18 19:10 unlight

@unlight Did we get any fix for this issue. We are facing the same issue. Loader-utils 0.2.17 version has critical vulnerability, so we need to update to latest version of version which is 2.3.0. When we tried to update, we are seeing below error. I see this dependency didn't update from last 6 years. Is there any temporary fix for the issue?

ERROR in .{projectpath}/spa/src/main.ts [INFO] Module build failed (from ./node_modules/angular2-template-loader/index.js): [INFO] Error: A valid query string passed to parseQuery should begin with '?' [INFO] at Object.parseQuery (node_modules/angular2-template-loader/node_modules/loader-utils/lib/parseQuery.js:13:11) [INFO] at Object.module.exports (node_modules/angular2-template-loader/index.js:21:27)

Gireeshk07 avatar Nov 08 '22 14:11 Gireeshk07

@Gireeshk07 Use angular-cli (https://angular.io/cli)

unlight avatar Nov 08 '22 16:11 unlight

@unlight

Is there any alternate to angular2-template-loader. Which can help in the same manner this dependency works ?

We tried @ngTools but that is not helpful in large project. And Errors for angular2-template-loader are different for different projects. Somewhere it is giving parse error and some places it miss the emoji.js

Medevwithdesign avatar Nov 08 '22 18:11 Medevwithdesign