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

Library do not work after upgrade to Angular 6 #102

Closed
karolke opened this issue Jun 5, 2018 · 4 comments
Closed

Library do not work after upgrade to Angular 6 #102

karolke opened this issue Jun 5, 2018 · 4 comments

Comments

@karolke
Copy link

karolke commented Jun 5, 2018

After upgrade from Angular 5, to Angular 6.0.7, cannot compile (using "ng serve"), and got error:

ERROR in ./node_modules/velocityjs/src/parse/index.js
Module not found: Error: Can't resolve 'path' in 'XXX\node_modules\velocityjs\src\parse'

After playing with source code, it seems, that problem is undefined 'path' variable at velocityjs/src/parse/index.js

I did not change velocityjs import command, and previously working one was:
"let Velocity = require('velocityjs');" or "import * as Velocity from 'velocityjs';

@shepherdwind
Copy link
Owner

What build tool did you used? webpack or something else?

I try this lib with webpack4, It is work fine.

@shepherdwind
Copy link
Owner

velocity.js/package.json

Lines 21 to 24 in fa72a31

"browser": {
"fs": false,
"path": false
},

This config will make the build tool ignore fs and path dependency, Maybe your tool do not support this feature.

@karolke
Copy link
Author

karolke commented Jun 6, 2018

I use "webpack": "^4.10.2" for build tool.

With config you've provided, everything works perfect, thanks! Will you apply this fix to main relase?

@shepherdwind
Copy link
Owner

1.0.2 published . I forget to push this change to npm .

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