Error: Recursion in resolving
alxpsr opened this issue · 1 comments
alxpsr commented
Versions
node v10.13.0
, npm v6.4.1
, windows-10
, crypto-browserify v3.12.0
Problem
Hi there! I import crypto-browserify in my angular-app like this:
//== main.ts
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppDesktopModule } from './app/app.desktop.module';
import 'crypto-browserify';
document.addEventListener('DOMContentLoaded', () => {
platformBrowserDynamic().bootstrapModule(AppDesktopModule);
});
When i build app with webpack i got an strange error (see below for details). What i'm do it wrong?
Error stack:
ERROR in ./node_modules/asn1.js/lib/asn1/base/buffer.js
Module not found: Error: Recursion in resolving
Stack:
resolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\base) buffer
newResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\base) buffer
parsedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\base) buffer module
describedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\base) buffer module
resolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\base) c:\projects\temp\node_modules\buffer\index.js module
newResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\base) c:\projects\temp\node_modules\buffer\index.js module
parsedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\base) c:\projects\temp\node_modules\buffer\index.js
describedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\base) c:\projects\temp\node_modules\buffer\index.js
resolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\base) c:\projects\temp\node_modules\buffer\index.js
newResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\base) c:\projects\temp\node_modules\buffer\index.js
@ ./node_modules/asn1.js/lib/asn1/base/buffer.js 3:13-30
@ ./node_modules/asn1.js/lib/asn1/base/index.js
@ ./node_modules/asn1.js/lib/asn1.js
@ ./node_modules/parse-asn1/asn1.js
@ ./node_modules/parse-asn1/index.js
@ ./node_modules/public-encrypt/publicEncrypt.js
@ ./node_modules/public-encrypt/browser.js
@ ./node_modules/crypto-browserify/index.js
@ ./src/main.desktop.ts
ERROR in ./node_modules/asn1.js/lib/asn1/decoders/pem.js
Module not found: Error: Recursion in resolving
Stack:
resolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\decoders) buffer
newResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\decoders) buffer
parsedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\decoders) buffer module
describedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\decoders) buffer module
resolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\decoders) c:\projects\temp\node_modules\buffer\index.js module
newResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\decoders) c:\projects\temp\node_modules\buffer\index.js module
parsedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\decoders) c:\projects\temp\node_modules\buffer\index.js
describedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\decoders) c:\projects\temp\node_modules\buffer\index.js
resolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\decoders) c:\projects\temp\node_modules\buffer\index.js
newResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\decoders) c:\projects\temp\node_modules\buffer\index.js
@ ./node_modules/asn1.js/lib/asn1/decoders/pem.js 2:13-30
@ ./node_modules/asn1.js/lib/asn1/decoders/index.js
@ ./node_modules/asn1.js/lib/asn1.js
@ ./node_modules/parse-asn1/asn1.js
@ ./node_modules/parse-asn1/index.js
@ ./node_modules/public-encrypt/publicEncrypt.js
@ ./node_modules/public-encrypt/browser.js
@ ./node_modules/crypto-browserify/index.js
@ ./src/main.desktop.ts
ERROR in ./node_modules/asn1.js/lib/asn1/encoders/der.js
Module not found: Error: Recursion in resolving
Stack:
resolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\encoders) buffer
newResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\encoders) buffer
parsedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\encoders) buffer module
describedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\encoders) buffer module
resolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\encoders) c:\projects\temp\node_modules\buffer\index.js module
newResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\encoders) c:\projects\temp\node_modules\buffer\index.js module
parsedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\encoders) c:\projects\temp\node_modules\buffer\index.js
describedResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\encoders) c:\projects\temp\node_modules\buffer\index.js
resolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\encoders) c:\projects\temp\node_modules\buffer\index.js
newResolve: (c:\projects\temp\node_modules\asn1.js\lib\asn1\encoders) c:\projects\temp\node_modules\buffer\index.js
@ ./node_modules/asn1.js/lib/asn1/encoders/der.js 2:13-30
@ ./node_modules/asn1.js/lib/asn1/encoders/index.js
@ ./node_modules/asn1.js/lib/asn1.js
@ ./node_modules/parse-asn1/asn1.js
@ ./node_modules/parse-asn1/index.js
@ ./node_modules/public-encrypt/publicEncrypt.js
@ ./node_modules/public-encrypt/browser.js
@ ./node_modules/crypto-browserify/index.js
@ ./src/main.desktop.ts
ERROR in ./node_modules/browserify-sign/browser/index.js
Module not found: Error: Recursion in resolving
Stack:
resolve: (c:\projects\temp\node_modules\browserify-sign\browser) stream
newResolve: (c:\projects\temp\node_modules\browserify-sign\browser) stream
parsedResolve: (c:\projects\temp\node_modules\browserify-sign\browser) stream module
describedResolve: (c:\projects\temp\node_modules\browserify-sign\browser) stream module
resolve: (c:\projects\temp\node_modules\browserify-sign\browser) c:\projects\temp\node_modules\stream-browserify\index.js module
newResolve: (c:\projects\temp\node_modules\browserify-sign\browser) c:\projects\temp\node_modules\stream-browserify\index.js module
parsedResolve: (c:\projects\temp\node_modules\browserify-sign\browser) c:\projects\temp\node_modules\stream-browserify\index.js
describedResolve: (c:\projects\temp\node_modules\browserify-sign\browser) c:\projects\temp\node_modules\stream-browserify\index.js
resolve: (c:\projects\temp\node_modules\browserify-sign\browser) c:\projects\temp\node_modules\stream-browserify\index.js
newResolve: (c:\projects\temp\node_modules\browserify-sign\browser) c:\projects\temp\node_modules\stream-browserify\index.js
@ ./node_modules/browserify-sign/browser/index.js 2:13-30
@ ./node_modules/crypto-browserify/index.js
@ ./src/main.desktop.ts
ERROR in ./node_modules/cipher-base/index.js
Module not found: Error: Recursion in resolving
Stack:
resolve: (c:\projects\temp\node_modules\cipher-base) stream
newResolve: (c:\projects\temp\node_modules\cipher-base) stream
parsedResolve: (c:\projects\temp\node_modules\cipher-base) stream module
describedResolve: (c:\projects\temp\node_modules\cipher-base) stream module
resolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\stream-browserify\index.js module
newResolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\stream-browserify\index.js module
parsedResolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\stream-browserify\index.js
describedResolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\stream-browserify\index.js
resolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\stream-browserify\index.js
newResolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\stream-browserify\index.js
@ ./node_modules/cipher-base/index.js 2:16-33
@ ./node_modules/create-hash/browser.js
@ ./node_modules/crypto-browserify/index.js
@ ./src/main.desktop.ts
ERROR in ./node_modules/cipher-base/index.js
Module not found: Error: Recursion in resolving
Stack:
resolve: (c:\projects\temp\node_modules\cipher-base) string_decoder
newResolve: (c:\projects\temp\node_modules\cipher-base) string_decoder
parsedResolve: (c:\projects\temp\node_modules\cipher-base) string_decoder module
describedResolve: (c:\projects\temp\node_modules\cipher-base) string_decoder module
resolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\string_decoder\lib\string_decoder.js module
newResolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\string_decoder\lib\string_decoder.js module
parsedResolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\string_decoder\lib\string_decoder.js
describedResolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\string_decoder\lib\string_decoder.js
resolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\string_decoder\lib\string_decoder.js
newResolve: (c:\projects\temp\node_modules\cipher-base) c:\projects\temp\node_modules\string_decoder\lib\string_decoder.js
@ ./node_modules/cipher-base/index.js 3:20-45
@ ./node_modules/create-hash/browser.js
@ ./node_modules/crypto-browserify/index.js
@ ./src/main.desktop.ts
ERROR in ./node_modules/hash-base/index.js
Module not found: Error: Recursion in resolving
Stack:
resolve: (c:\projects\temp\node_modules\hash-base) stream
newResolve: (c:\projects\temp\node_modules\hash-base) stream
parsedResolve: (c:\projects\temp\node_modules\hash-base) stream module
describedResolve: (c:\projects\temp\node_modules\hash-base) stream module
resolve: (c:\projects\temp\node_modules\hash-base) c:\projects\temp\node_modules\stream-browserify\index.js module
newResolve: (c:\projects\temp\node_modules\hash-base) c:\projects\temp\node_modules\stream-browserify\index.js module
parsedResolve: (c:\projects\temp\node_modules\hash-base) c:\projects\temp\node_modules\stream-browserify\index.js
describedResolve: (c:\projects\temp\node_modules\hash-base) c:\projects\temp\node_modules\stream-browserify\index.js
resolve: (c:\projects\temp\node_modules\hash-base) c:\projects\temp\node_modules\stream-browserify\index.js
newResolve: (c:\projects\temp\node_modules\hash-base) c:\projects\temp\node_modules\stream-browserify\index.js
@ ./node_modules/hash-base/index.js 3:16-33
@ ./node_modules/md5.js/index.js
@ ./node_modules/create-hash/browser.js
@ ./node_modules/crypto-browserify/index.js
@ ./src/main.desktop.ts
ERROR in ./node_modules/ripemd160/index.js
Module not found: Error: Recursion in resolving
Stack:
resolve: (c:\projects\temp\node_modules\ripemd160) buffer
newResolve: (c:\projects\temp\node_modules\ripemd160) buffer
parsedResolve: (c:\projects\temp\node_modules\ripemd160) buffer module
describedResolve: (c:\projects\temp\node_modules\ripemd160) buffer module
resolve: (c:\projects\temp\node_modules\ripemd160) c:\projects\temp\node_modules\buffer\index.js module
newResolve: (c:\projects\temp\node_modules\ripemd160) c:\projects\temp\node_modules\buffer\index.js module
parsedResolve: (c:\projects\temp\node_modules\ripemd160) c:\projects\temp\node_modules\buffer\index.js
describedResolve: (c:\projects\temp\node_modules\ripemd160) c:\projects\temp\node_modules\buffer\index.js
resolve: (c:\projects\temp\node_modules\ripemd160) c:\projects\temp\node_modules\buffer\index.js
newResolve: (c:\projects\temp\node_modules\ripemd160) c:\projects\temp\node_modules\buffer\index.js
@ ./node_modules/ripemd160/index.js 2:13-30
@ ./node_modules/create-hash/browser.js
@ ./node_modules/crypto-browserify/index.js
@ ./src/main.desktop.ts
ERROR in ./node_modules/safe-buffer/index.js
Module not found: Error: Recursion in resolving
Stack:
resolve: (c:\projects\temp\node_modules\safe-buffer) buffer
newResolve: (c:\projects\temp\node_modules\safe-buffer) buffer
parsedResolve: (c:\projects\temp\node_modules\safe-buffer) buffer module
describedResolve: (c:\projects\temp\node_modules\safe-buffer) buffer module
resolve: (c:\projects\temp\node_modules\safe-buffer) c:\projects\temp\node_modules\buffer\index.js module
newResolve: (c:\projects\temp\node_modules\safe-buffer) c:\projects\temp\node_modules\buffer\index.js module
parsedResolve: (c:\projects\temp\node_modules\safe-buffer) c:\projects\temp\node_modules\buffer\index.js
describedResolve: (c:\projects\temp\node_modules\safe-buffer) c:\projects\temp\node_modules\buffer\index.js
resolve: (c:\projects\temp\node_modules\safe-buffer) c:\projects\temp\node_modules\buffer\index.js
newResolve: (c:\projects\temp\node_modules\safe-buffer) c:\projects\temp\node_modules\buffer\index.js
@ ./node_modules/safe-buffer/index.js 2:13-30
@ ./node_modules/randombytes/browser.js
@ ./node_modules/crypto-browserify/index.js
@ ./src/main.desktop.ts
alxpsr commented
Sorry for disturb. Problem was in my tsconfig.json
. I was use *
in paths
. I don't know why but is not right for @ngtools/webpack
plugin. ^_^