rnadler / ng9-password-strength-bar

Angular 9+ Password Strength Bar
MIT License
0 stars 3 forks source link

1.0.1 has broken changes? error TS2307: Cannot find module 'ng9-password-strength-bar'. #1

Closed RiverLi closed 3 years ago

RiverLi commented 3 years ago

1.0.0 Version has no problem, but 1.0.1 has problem.

ERROR in src/app/app.module.ts:9:46 - error TS2307: Cannot find module 'ng9-password-strength-bar'.

9 import { Ng9PasswordStrengthBarModule } from "ng9-password-strength-bar";



ERROR in app/app.module.ts(138,5): Error during template compile of 'AppModule'
  Could not resolve ng9-password-strength-bar relative to [object Object]..
app/app.module.ts(138,5): Error during template compile of 'AppModule'
  Could not resolve ng9-password-strength-bar relative to [object Object]..
Can't bind to 'passwordToCheck' since it isn't a known property of 'ng9-password-strength-bar'.
1. If 'ng9-password-strength-bar' is an Angular component and it has 'passwordToCheck' input, then verify that it is part of this module.
2. If 'ng9-password-strength-bar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("           <td>
                            <ng9-password-strength-bar
                            [ERROR ->][passwordToCheck]="newPassword"
                            [barLabel]="barLabel"
                   ")
Can't bind to 'barLabel' since it isn't a known property of 'ng9-password-strength-bar'.
1. If 'ng9-password-strength-bar' is an Angular component and it has 'barLabel' input, then verify that it is part of this module.
2. If 'ng9-password-strength-bar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("rength-bar
                            [passwordToCheck]="newPassword"
                            [ERROR ->][barLabel]="barLabel"
                            [barColors]="myColors"
                            ")
Can't bind to 'barColors' since it isn't a known property of 'ng9-password-strength-bar'.
1. If 'ng9-password-strength-bar' is an Angular component and it has 'barColors' input, then verify that it is part of this module.
2. If 'ng9-password-strength-bar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("oCheck]="newPassword"
                            [barLabel]="barLabel"
                            [ERROR ->][barColors]="myColors"
                            [strengthLabels]="strengthLabels"
                ")
Can't bind to 'strengthLabels' since it isn't a known property of 'ng9-password-strength-bar'.
1. If 'ng9-password-strength-bar' is an Angular component and it has 'strengthLabels' input, then verify that it is part of this module.
2. If 'ng9-password-strength-bar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("barLabel]="barLabel"
                            [barColors]="myColors"
                            [ERROR ->][strengthLabels]="strengthLabels"
                            (onStrengthChanged)="strengthChanged($e")
'ng9-password-strength-bar' is not a known element:
1. If 'ng9-password-strength-bar' is an Angular component, then verify that it is part of this module.
2. If 'ng9-password-strength-bar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
                        <td></td>
                        <td>
                            [ERROR ->]<ng9-password-strength-bar
                            [passwordToCheck]="newPassword"
             ")

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! workassure.labor.web@0.0.0 build: `ng build --prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the workassure.labor.web@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v14.9.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle workassure.labor.web@0.0.0~prebuild: workassure.labor.web@0.0.0
6 info lifecycle workassure.labor.web@0.0.0~build: workassure.labor.web@0.0.0
7 verbose lifecycle workassure.labor.web@0.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle workassure.labor.web@0.0.0~build: PATH: C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\WACode\workassure.labor\src\WorkAssure.Labor.Web\node_modules\.bin;C:\app\client\Administrator\product\12.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\nodejs\;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\Administrator\.windows-build-tools\python27\;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrator\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\.bin;C:\Users\Administrator\AppData\Roaming\npm\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\.dotnet\tools
9 verbose lifecycle workassure.labor.web@0.0.0~build: CWD: C:\WACode\workassure.labor\src\WorkAssure.Labor.Web
10 silly lifecycle workassure.labor.web@0.0.0~build: Args: [ '/d /s /c', 'ng build --prod' ]
11 silly lifecycle workassure.labor.web@0.0.0~build: Returned: code: 1  signal: null
12 info lifecycle workassure.labor.web@0.0.0~build: Failed to exec build script
13 verbose stack Error: workassure.labor.web@0.0.0 build: `ng build --prod`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:314:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:314:20)
13 verbose stack     at maybeClose (internal/child_process.js:1047:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid workassure.labor.web@0.0.0
15 verbose cwd C:\WACode\workassure.labor\src\WorkAssure.Labor.Web
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v14.9.0
19 verbose npm  v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error workassure.labor.web@0.0.0 build: `ng build --prod`
22 error Exit status 1
23 error Failed at the workassure.labor.web@0.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
rnadler commented 3 years ago

This error does not appear to be related to the v1.0.1 change. Is it possible to provide code that reproduces the problem? Thanks.

RiverLi commented 3 years ago

This error does not appear to be related to the v1.0.1 change. Is it possible to provide code that reproduces the problem? Thanks. app.module.ts file: `[//3rd party import { BrowserModule } from "@angular/platform-browser"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; import { NgModule, ErrorHandler, APP_INITIALIZER } from "@angular/core"; import { HttpModule } from '@angular/http'; import { HTTP_INTERCEPTORS, HttpClientModule, HttpClient } from "@angular/common/http"; import { ClipboardModule } from "ngx-clipboard"; import { NgSelectModule } from "@ng-select/ng-select"; import { Ng9PasswordStrengthBarModule } from "ng9-password-strength-bar"; import { MomentModule } from "ngx-moment"; import { FormsModule } from "@angular/forms"; import { CustomFormsModule } from "ngx-custom-validators"; import { NgxChartsModule } from "@swimlane/ngx-charts"; import {TranslateModule, TranslateLoader, MissingTranslationHandler, MissingTranslationHandlerParams} from "@ngx-translate/core"; import { httpLoaderFactory } from "./shared/factories/httploader.factory"; import { OAuthModule } from 'angular-oauth2-oidc';

//other imports ...... ...... ......

@NgModule({ imports: [ ..., Ng9PasswordStrengthBarModule, ... ], declarations: [ ... ], providers: [ ... ], bootstrap: [AppComponent] }) ](url)`

After changing to 1.0.1, the code compile error in the line of import.

rnadler commented 3 years ago

The v1.0.1 NPM publish was bad. Please try v1.0.2.