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

Add '@juggle/resize-observer' to dependencies #185

Closed
ajeiie120120 opened this issue Aug 28, 2019 · 5 comments
Closed

Add '@juggle/resize-observer' to dependencies #185

ajeiie120120 opened this issue Aug 28, 2019 · 5 comments
Milestone

Comments

@ajeiie120120
Copy link

[Can't reproduce on stackblitz]

In version 5.0.1 this error is triggered on ng start:

ERROR in ./node_modules/ngx-scrollbar/fesm2015/ngx-scrollbar.js
Module not found: Error: Can't resolve '@juggle/resize-observer' in 'C:\Users\davdi\IdeaProjects\CouchFactoryConsole\node_modules\ngx-scrollbar\fesm2015'

I suppose is due to this line of code in ngx-scrollbar.js:

from(import('@juggle/resize-observer')).pipe(map((/**

This is my angular.json:

{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "CouchFactoryConsole": { "root": "", "sourceRoot": "src", "projectType": "application", "prefix": "eks", "schematics": { "@schematics/angular:component": { "styleext": "less" } }, "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist/CouchFactoryConsole", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.app.json", "assets": [ "src/favicon.ico", "src/assets", { "glob": "**/*", "input": "./node_modules/@ant-design/icons-angular/src/inline-svg/", "output": "/assets/" } ], "styles": [ "src/styles/main.scss", "src/styles/main.less" ], "scripts": [], "stylePreprocessorOptions": { "includePaths": [ "node_modules", "src/styles/" ] } }, "configurations": { "production": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } ], "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, "budgets": [ { "type": "initial", "maximumWarning": "2mb", "maximumError": "5mb" } ] } } }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "CouchFactoryConsole:build" }, "configurations": { "production": { "browserTarget": "CouchFactoryConsole:build:production" } } }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", "options": { "browserTarget": "CouchFactoryConsole:build" } }, "test": { "builder": "@angular-devkit/build-angular:karma", "options": { "main": "src/test.ts", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.spec.json", "karmaConfig": "src/karma.conf.js", "styles": [ "src/styles/main.scss", "src/styles/main.less" ], "scripts": [], "stylePreprocessorOptions": { "includePaths": [ "node_modules", "src/styles/" ] }, "assets": [ "src/favicon.ico", "src/assets" ] } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ "src/tsconfig.app.json", "src/tsconfig.spec.json" ], "exclude": [ "**/node_modules/**" ] } } } } }, "defaultProject": "CouchFactoryConsole" }

Maybe the dependency has not been imported in the bundle?

Thanks

@MurhafSousli
Copy link
Owner

You have to install the package manually npm i @juggle/resize-observer

@demkalkov
Copy link

Can't you just add this dependency to package.json? This is definitely a dependency of ngx-scrollbar, so why it is not there?

@MurhafSousli
Copy link
Owner

MurhafSousli commented Sep 6, 2019

@demkalkov It is added in the peer dependencies https://github.com/MurhafSousli/ngx-scrollbar/blob/master/projects/ngx-scrollbar/package.json, is there a way to get it installed out of the box?

@ajeiie120120
Copy link
Author

@demkalkov It is added in the peer dependencies https://github.com/MurhafSousli/ngx-scrollbar/blob/master/projects/ngx-scrollbar/package.json, is there a way to get it installed out of the box?

Sure, just put it in the dependencies instead, npm will do the work

@MurhafSousli
Copy link
Owner

@ajeiie120120 Great will try that in the next update

@MurhafSousli MurhafSousli reopened this Sep 8, 2019
@MurhafSousli MurhafSousli changed the title Can't resolve '@juggle/resize-observer' Add '@juggle/resize-observer' to dependencies Sep 8, 2019
@MurhafSousli MurhafSousli added this to the v6.0.0 milestone Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants