Giter VIP home page Giter VIP logo

Comments (12)

swiety85 avatar swiety85 commented on May 25, 2024 1

You were right. It seamed to be webpack dependency issue. It should be fixed in v.0.6.4.
Please check and give a hint if it works.

from angular2gridster.

TolotraRam avatar TolotraRam commented on May 25, 2024

It's only with lazy loading routes

from angular2gridster.

swiety85 avatar swiety85 commented on May 25, 2024

Hi, it seams that it could be more general issue: angular/angular-cli#4246, nevertheless I will have a look on that.
Thanx for info.

from angular2gridster.

TolotraRam avatar TolotraRam commented on May 25, 2024

Re,
Yes there is a bug with angular-cli but something strange is that if i uninstall angular2gridster ng serve didn't fail (Work as expected) but if i install angular2gridster it cause the bug.

from angular2gridster.

TolotraRam avatar TolotraRam commented on May 25, 2024

Ok here are some test i did such as i didn't install angular2gridster with npm but integrate the source with my project like your demo page and things work fine. Thinks it's something weird about the webpack version you included in your package as dependencies.

from angular2gridster.

swiety85 avatar swiety85 commented on May 25, 2024

Can you send me which version of angular cli you use?

from angular2gridster.

TolotraRam avatar TolotraRam commented on May 25, 2024

I've used 1.0.4 before and now used 1.2.0

from angular2gridster.

HyenaCros avatar HyenaCros commented on May 25, 2024

I had the same problem and I'm sure it has something to do with webpack versions. I managed to solve the problem by installing the angular cli locally before running normal npm install. I noticed that if I installed normally, angular cli would have webpack in its node_modules folder but not if I installed the it first.

from angular2gridster.

Halynsky avatar Halynsky commented on May 25, 2024

I have similar problem. We also have many LazyLoading modules in our project.

Angular - 4.2.5
AngularCLI - 1.2.0
Webpack - 3.1.0

[ERROR]  12% building modules 21/28 modules 7 active ...de_modules\css-loader\lib\cs
 13% building modules 29/43 modules 14 active ...src\app\components\app.component.html
[ERROR] An error occured during the build:
[ERROR] Error: No module factory available for dependency type: ContextElementDependency
[ERROR]     at Compilation.addModuleDependencies (E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:206:21)
[ERROR]     at Compilation.processModuleDependencies (E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:195:8)
[ERROR]     at _this.buildModule.err (E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:336:13)
[ERROR]     at building.forEach.cb (E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:140:27)
[ERROR]     at Array.forEach (native)
[ERROR]     at callback (E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:140:13)
[ERROR]     at module.build (E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:167:11)
[ERROR]     at resolveDependencies (E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\ContextModule.js:133:4)
[ERROR]     at ContextModule.result.resolveDependencies (E:\WorkSpase\improver\browser\node_modules\@ngtools\webpack\src\plugin.js:229:25)
[ERROR]     at ContextModule.build (E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\ContextModule.js:103:8)
[ERROR]     at Compilation.buildModule (E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:142:10)
[ERROR]     at factoryCallback (E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\Compilation.js:325:11)
[ERROR]     at E:\WorkSpase\improver\browser\node_modules\@angular\cli\node_modules\webpack\lib\ContextModuleFactory.js:96:12
[ERROR]     at E:\WorkSpase\improver\browser\node_modules\tapable\lib\Tapable.js:204:11
[ERROR]     at done.then (E:\WorkSpase\improver\browser\node_modules\@ngtools\webpack\src\plugin.js:231:28)
[ERROR]     at <anonymous>

from angular2gridster.

rudzikdawid avatar rudzikdawid commented on May 25, 2024

same issue here

npm ls -g --depth=0

/usr/lib
├── [email protected]
└── [email protected]

package.json:

  "dependencies": {
    "@angular/animations": "^4.3.0",
    "@angular/cdk": "github:angular/cdk-builds",
    "@angular/common": "^4.3.0",
    "@angular/compiler": "^4.3.0",
    "@angular/core": "^4.3.0",
    "@angular/flex-layout": "angular/flex-layout-builds",
    "@angular/forms": "^4.3.0",
    "@angular/http": "^4.3.0",
    "@angular/material": "angular/material2-builds",
    "@angular/platform-browser": "^4.3.0",
    "@angular/platform-browser-dynamic": "^4.3.0",
    "@angular/platform-server": "^4.3.0",
    "@angular/router": "^4.3.0",
    "angular2gridster": "^0.6.3",
    "core-js": "^2.4.1",
    "hammerjs": "^2.0.8",
    "rxjs": "^5.0.1",
    "zone.js": "^0.8.12"
  },
  "devDependencies": {
    "@angular/cli": "^1.2.3",
    "@angular/compiler-cli": "^4.3.0",
    "@types/jasmine": "2.5.46",
    "@types/node": "~7.0.12",
    "codelyzer": "~3.0.1",
    "simple-git": "^1.69.0",
    "simple-terminal-menu": "^1.1.3",
    "ts-node": "~3.0.4",
    "tslint": "^5.3.2",
    "typescript": "^2.4.1"
  }

ng serve

12% building modules 17/29 modules 12 active ...art/node_modules/zone.js/dist/zone.jsError: No module factory available for dependency type: ContextElementDependency
    at Compilation.addModuleDependencies (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:206:21)
    at Compilation.processModuleDependencies (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:195:8)
    at _this.buildModule.err (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:336:13)
    at building.forEach.cb (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:140:27)
    at Array.forEach (native)
    at callback (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:140:13)
    at module.build (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:167:11)
    at resolveDependencies (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/ContextModule.js:133:4)
    at ContextModule.result.resolveDependencies (/home/mike_oldfield/material2-start/node_modules/@ngtools/webpack/src/plugin.js:249:25)
    at ContextModule.build (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/ContextModule.js:103:8)
    at Compilation.buildModule (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:142:10)
    at factoryCallback (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:325:11)
    at /home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/ContextModuleFactory.js:96:12
    at /home/mike_oldfield/material2-start/node_modules/tapable/lib/Tapable.js:250:11
    at done.then (/home/mike_oldfield/material2-start/node_modules/@ngtools/webpack/src/plugin.js:251:28)               13% building modules 29/36 modules 7 active ...terial2-start/node_modules/rxjs/Rx.js/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:265
                                if(_this.profile) {
                                        ^

TypeError: Cannot read property 'profile' of null
    at factoryCallback (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:265:13)
    at factory (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/NormalModuleFactory.js:253:5)
    at applyPluginsAsyncWaterfall (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/NormalModuleFactory.js:99:14)
    at /home/mike_oldfield/material2-start/node_modules/tapable/lib/Tapable.js:250:11
    at NormalModuleFactory.params.normalModuleFactory.plugin (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/home/mike_oldfield/material2-start/node_modules/tapable/lib/Tapable.js:254:13)
    at resolver (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/NormalModuleFactory.js:74:11)
    at process.nextTick (/home/mike_oldfield/material2-start/node_modules/@angular/cli/node_modules/webpack/lib/NormalModuleFactory.js:205:8)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

from angular2gridster.

rudzikdawid avatar rudzikdawid commented on May 25, 2024

It could be afected by package.json dependency: "webpack": "^2.2.1"
Maybe webpack should by in devDependencies section ?

from angular2gridster.

rudzikdawid avatar rudzikdawid commented on May 25, 2024

It seems like everything work just fine.
aot compilation without errors

from angular2gridster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.