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 serve in demo folder gives this crypto error. #189

Closed
rafialikhan opened this issue Jul 14, 2017 · 2 comments
Closed

ng serve in demo folder gives this crypto error. #189

rafialikhan opened this issue Jul 14, 2017 · 2 comments

Comments

@rafialikhan
Copy link

rafialikhan commented Jul 14, 2017

Cloned the repo. Did npm run demo.

OS: Mac OS X El Capitan
Node Version: v6.10.0
npm -v: 4.4.4

Also any possibility of a setting up a live demo, so we can take a quick look if this is the right component someone wants to use. It took me almost 1/2 hour to get npm install to complete and then this...

Seems to be a webpack issue - then again not, its an angular material issue. read my next comment.

 86% hashingcrypto.js:74                                                                 
  this._handle.update(data, encoding);
               ^

TypeError: Data must be a string or a buffer
    at TypeError (native)
    at Hash.update (crypto.js:74:16)
    at HarmonyExportImportedSpecifierDependency.updateHash (/Users/****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency.js:144:8)
    at /Users/*****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/webpack/lib/DependenciesBlock.js:33:5
    at Array.forEach (native)
    at NormalModule.DependenciesBlock.updateHash (/Users/*****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/webpack/lib/DependenciesBlock.js:32:20)
    at NormalModule.Module.updateHash (/Users/****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/webpack/lib/Module.js:162:41)
    at NormalModule.updateHash (/Users/****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/webpack/lib/NormalModule.js:327:30)
    at modules.forEach.m (/Users/****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/webpack/lib/Chunk.js:253:31)
    at Array.forEach (native)
    at Chunk.updateHash (/Users/****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/webpack/lib/Chunk.js:253:16)
    at Compilation.createHash (/Users/****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/webpack/lib/Compilation.js:1121:10)
    at sealPart2 (/Users/****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/webpack/lib/Compilation.js:605:9)
    at next (/Users/****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/tapable/lib/Tapable.js:138:11)
    at Compilation.<anonymous> (/Users/****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/webpack/lib/ProgressPlugin.js:110:5)
    at Compilation.applyPluginsAsyncSeries (/Users/****/Projects/test/ng2-scroll/ng2-page-scroll/demo/node_modules/tapable/lib/Tapable.js:142:13)```
@rafialikhan
Copy link
Author

rafialikhan commented Jul 14, 2017

Changing the version of angular material to "@angular/material": "2.0.0-beta.5" in the package.json file instead of "@angular/material": "^2.0.0-beta.5" worked. Apparently angular material now needs @ angular/cdk and this is not present in the pacakage.json file, and therefore broke everything in the material world.

npm update (once you have changed the package.json as mentioned above)
then run
ng serve - works.

https://github.com/angular/material2/blob/master/guides/getting-started.md#step-1-install-angular-material-and-angular-cdk

Can you please confirm that ng2-page-scroll has no dependency with angular-material as such?

@Nolanus
Copy link
Owner

Nolanus commented Aug 2, 2017

Sorry for the late follow up.
ng2-page-scrolldoes not have a dependency on angular/material, but the demo application, which is included in the git repo, does. However, the demo app is not shipped via npm.
An update of angular/material added the peer-dependency requirement for angular/cdk, which caused the demo app and build process of this project to fail, as the angular/material constraint automatically pulled the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants