ngx-translate-po-http-loader icon indicating copy to clipboard operation
ngx-translate-po-http-loader copied to clipboard

WARNING in ./node_modules/encoding/lib/iconv-loader.js 9:12-34

Open szabobar opened this issue 7 years ago • 7 comments

Hi,

I like your po loader, but after I injected your solution (from your guideline), I got the following warning message:

my dependencies are: @ angular/core: "^5.2.1", @ biesbjerg/ngx-translate-po-http-loader: "^2.0.1", @ ngx-translate/core: "^9.1.1",

and warning message:

WARNING in ./node_modules/encoding/lib/iconv-loader.js 9:12-34 Critical dependency: the request of a dependency is an expression at CommonJsRequireContextDependency.getWarnings (/home/user/webapp/node_modules/webpack/lib/dependencies/ContextDependency.js:39:18) at Compilation.reportDependencyErrorsAndWarnings (/home/user/webapp/node_modules/webpack/lib/Compilation.js:703:24) at Compilation.finish (/home/user/webapp/node_modules/webpack/lib/Compilation.js:561:9) at applyPluginsParallel.err (/home/user/webapp/node_modules/webpack/lib/Compiler.js:502:17) at /home/user/webapp/node_modules/tapable/lib/Tapable.js:289:11 at /home/user/webapp/node_modules/html-webpack-plugin/index.js:60:9 at tryCatcher (/home/user/webapp/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/user/webapp/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/home/user/webapp/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromise0 (/home/user/webapp/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/home/user/webapp/node_modules/bluebird/js/release/promise.js:693:18) at Async._drainQueue (/home/user/webapp/node_modules/bluebird/js/release/async.js:133:16) at Async._drainQueues (/home/user/webapp/node_modules/bluebird/js/release/async.js:143:10) at Immediate.Async.drainQueues (/home/user/webapp/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:789:20) at tryOnImmediate (timers.js:751:5) @ ./node_modules/encoding/lib/iconv-loader.js @ ./node_modules/encoding/lib/encoding.js @ ./node_modules/gettext-parser/lib/mocompiler.js @ ./node_modules/gettext-parser/index.js @ ./node_modules/@biesbjerg/ngx-translate-po-http-loader/dist/index.js @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

szabobar avatar Jan 19 '18 17:01 szabobar

Hi,

I also get that warning, everything works but it's kind of annoying to get that compilation warning. My dependencies are:

"dependencies": {
    "@angular/animations": "^5.2.1",
    "@angular/common": "^5.2.1",
    "@angular/compiler": "^5.2.1",
    "@angular/core": "^5.2.1",
    "@angular/forms": "^5.2.1",
    "@angular/http": "^5.2.1",
    "@angular/platform-browser": "^5.2.1",
    "@angular/platform-browser-dynamic": "^5.2.1",
    "@angular/router": "^5.2.1",
    "@biesbjerg/ngx-translate-po-http-loader": "^3.0.1",
    "@ngx-translate/core": "^9.1.1",
    "@ngx-translate/http-loader": "^2.0.1",
    "core-js": "^2.4.1",
    "rxjs": "^5.5.6",
    "zone.js": "^0.8.19"
  },
  "devDependencies": {
    "@angular/cli": "1.6.5",
    "@angular/compiler-cli": "^5.2.1",
    "@angular/language-service": "^5.2.1",
    "@biesbjerg/ngx-translate-extract": "^2.3.4",
    "@types/jasmine": "~2.8.3",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.9.1",
    "typescript": "~2.5.3"
  }

Thanks!

igorosabel avatar Jan 26 '18 08:01 igorosabel

This is problem in encoding package, that used by gettext-parser, and @biesbjerg can't do something. I found this solution. You need take patch from there (also see comment below patch).

timkolotov avatar Feb 28 '18 07:02 timkolotov

I also get the same error

[ng] WARNING in ./node_modules/encoding/lib/iconv-loader.js
[ng] 9:12-34 Critical dependency: the request of a dependency is an expression
[ng] ERROR in ./node_modules/gettext-parser/lib/poparser.js
[ng] Module not found: Error: Can't resolve 'stream' in '/Users/Dev/cmp/node_modules/gettext-parser/lib'
[ng] ERROR in ./node_modules/iconv-lite/lib/streams.js
[ng] Module not found: Error: Can't resolve 'stream' in '/Users/Dev/cmp/node_modules/iconv-lite/lib'
[ng] ERROR in ./node_modules/iconv-lite/lib/extend-node.js
[ng] Module not found: Error: Can't resolve 'stream' in '/Users/Dev/cmp/node_modules/iconv-lite/lib'
[ng] ℹ 「wdm」: Failed to compile.

I am using Angular 6.1

"dependencies": {
    "@angular/common": "~6.1.1",
    "@angular/core": "~6.1.1",
    "@angular/forms": "~6.1.1",
    "@angular/http": "~6.1.1",
    "@angular/platform-browser": "~6.1.1",
    "@angular/platform-browser-dynamic": "~6.1.1",
    "@angular/router": "~6.1.1",
    "@biesbjerg/ngx-translate-po-http-loader": "3.0.1",
    "@ionic-native/core": "5.0.0-beta.15",
    "@ionic-native/splash-screen": "5.0.0-beta.15",
    "@ionic-native/status-bar": "5.0.0-beta.15",
    "@ionic/angular": "4.0.0-beta.5",
    "@ngx-translate/core": "^10.0.2",
    "core-js": "^2.5.3",
    "rxjs": "6.2.2",
    "zone.js": "^0.8.26"
  }

marcjulian avatar Aug 29 '18 18:08 marcjulian

I have same issue

how to resolve ?

monkeycatdog avatar Apr 24 '19 09:04 monkeycatdog

@iamruslanbakirov did you tried it? https://github.com/andris9/encoding/issues/18#issuecomment-319721150

timkolotov avatar Apr 24 '19 18:04 timkolotov

@timkolotov no, because i use angular-cli and webpack config has encapsulated so deep.

monkeycatdog avatar Apr 25 '19 09:04 monkeycatdog

@iamruslanbakirov you don't need webpack config. This patch should be configured in package.json.

timkolotov avatar Apr 25 '19 17:04 timkolotov