The Wayback Machine - http://web.archive.org/web/20210111234851/https://github.com/akveo/ngx-admin/issues/5773
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`ng test` not working: "Module not found..." #5773

Open
RaschidJFR opened this issue Sep 21, 2020 · 0 comments · May be fixed by #5774
Open

`ng test` not working: "Module not found..." #5773

RaschidJFR opened this issue Sep 21, 2020 · 0 comments · May be fixed by #5774

Comments

@RaschidJFR
Copy link

@RaschidJFR RaschidJFR commented Sep 21, 2020

Issue type

I'm submitting a ... (check one with "x")

  • bug report
  • feature request
  • question about the decisions made in the repository

Issue description

Current behavior:

Unit testing with ng test fails with error:

(base) raschidjfr@MacBook-Pro-de-Raschid ngx-admin % ng test
Warning: Entry point 'ngx-echarts/core' contains deep imports into '/Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/echarts/lib/echarts'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
10% building 2/2 modules 0 active20 09 2020 19:43:28.459:WARN [karma]: No captured browser, open http://localhost:9877/
20 09 2020 19:43:28.474:INFO [karma-server]: Karma v5.0.9 server started at http://0.0.0.0:9877/
20 09 2020 19:43:28.474:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
20 09 2020 19:43:28.477:INFO [launcher]: Starting browser Chrome

ERROR in multi ./node_modules/bootstrap/dist/css/bootstrap.css ./node_modules/typeface-exo/index.css ./node_modules/roboto-fontface/css/roboto/roboto-fontface.css ./node_modules/ionicons/scss/ionicons.scss ./node_modules/font-awesome/scss/font-awesome.scss ./node_modules/socicon/css/socicon.css ./node_modules/nebular-icons/scss/nebular-icons.scss ./node_modules/pace-js/templates/pace-theme-flash.tmpl.css ./src/app/@theme/styles/styles.scss
Module not found: Error: Can't resolve '/Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss' in '/Users/raschidjfr/Documents/git/github/ngx-admin'
resolve '/Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss' in '/Users/raschidjfr/Documents/git/github/ngx-admin'
  using description file: /Users/raschidjfr/Documents/git/github/ngx-admin/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /Users/raschidjfr/Documents/git/github/ngx-admin/package.json (relative path: ./node_modules/font-awesome/scss/font-awesome.scss)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss.ts doesn't exist
      .tsx
        Field 'browser' doesn't contain a valid alias configuration
        /Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss.tsx doesn't exist
      .mjs
        Field 'browser' doesn't contain a valid alias configuration
        /Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss.mjs doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss.js doesn't exist
      as directory
        /Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss doesn't exist
[/Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss]
[/Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss.ts]
[/Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss.tsx]
[/Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss.mjs]
[/Users/raschidjfr/Documents/git/github/ngx-admin/node_modules/font-awesome/scss/font-awesome.scss.js]
 @ multi ./node_modules/bootstrap/dist/css/bootstrap.css ./node_modules/typeface-exo/index.css ./node_modules/roboto-fontface/css/roboto/roboto-fontface.css ./node_modules/ionicons/scss/ionicons.scss ./node_modules/font-awesome/scss/font-awesome.scss ./node_modules/socicon/css/socicon.css ./node_modules/nebular-icons/scss/nebular-icons.scss ./node_modules/pace-js/templates/pace-theme-flash.tmpl.css ./src/app/@theme/styles/styles.scss styles[4]
20 09 2020 19:43:46.414:INFO [Chrome 85.0.4183.102 (Mac OS 10.15.6)]: Connected on socket ALBB5HsXflPdjty5AAAA with id 29982972
Chrome 85.0.4183.102 (Mac OS 10.15.6): Executed 0 of 0 SUCCESS (0.001 secs / 0 secs)
TOTAL: 0 SUCCESS
TOTAL: 0 SUCCESS

Expected behavior:

Unit test should build and run

Steps to reproduce:

  1. clone repo: $ git clone git@github.com:akveo/ngx-admin.git
  2. instal npm modules: $ npm i
  3. run tets: $ ng test

Related code:

The problem seems to be that path to FontAwesome's styles in angular.json is outdated:

// angular.json
"architect": {
  "test": {
    "options": {
      "styles": [
        "node_modules/font-awesome/scss/font-awesome.scss",  // <-- this line
      ],
...

Other information:

npm, node, OS, Browser
Node, npm: v12.18.2 and 6.14.5
OS: MacOS 10.15.6 (19G2021)
Browser: Chrome 85.0.4183.102 (Build oficial) (64 bits)

Angular, Nebular

// package.json
"dependencies": {
    "@akveo/ng2-completer": "^9.0.1",
    "@angular/animations": "^9.0.4",
    "@angular/cdk": "^9.1.2",
    "@angular/common": "^9.0.4",
    "@angular/compiler": "^9.0.4",
    "@angular/core": "^9.0.4",
    "@angular/forms": "^9.0.4",
    "@angular/google-maps": "^9.1.0",
    "@angular/platform-browser": "^9.0.4",
    "@angular/platform-browser-dynamic": "^9.0.4",
    "@angular/router": "^9.0.4",
    ...
    "@nebular/auth": "5.0.0",
    "@nebular/eva-icons": "5.0.0",
    "@nebular/security": "5.0.0",
    "@nebular/theme": "5.0.0",
    ...
}
RaschidJFR added a commit to RaschidJFR/ngx-admin that referenced this issue Sep 21, 2020

@RaschidJFR RaschidJFR linked a pull request that will close this issue Sep 21, 2020

2 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.