Open nikhilgoud opened 6 years ago
This seems like a source-map-loader issue. Try excluding the library in your webpack config.
{ test: /\.js$/, loader: 'source-map-loader', exclude: ['node_modules/ngx-uploader'] },
Problem is that after installation src
folder resides inside of ./dist
which makes all ./src
references broken. If I replace public_api.ts/index.ts referenses from ./src
to ./dist/src
it all works.
It seems like to many files are published to the repository. According to this article https://medium.com/@nikolasleblanc/building-an-angular-4-component-library-with-the-angular-cli-and-ng-packagr-53b2ade0701e#8dd5 only ./dist
folder should be published.
When I moved everything from the ./dist
folder to the ./
and removed everything else then it works well.
I have probably same problem after upgrading project to angular 6. Don't you have pullrequest to fix it?
ERROR in ./node_modules/ngx-uploader/src/ngx-uploader/directives/ng-file-select.directive.ts
Module build failed: Error: C:\dev\workspace\idea\node_modules\ngx-uploader\src\ngx-uploader\directives\ng-file-select.directive.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files
' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Pa
ckage Format (https://goo.gl/jB3GVv).
at AngularCompilerPlugin.getCompiledFile (C:\dev\workspace\idea\zeus-slot-3\zeus\zeus-frontend\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:674:23)
at plugin.done.then (C:\dev\workspace\idea\zeus-slot-3\zeus\zeus-frontend\node_modules\@ngtools\webpack\src\loader.js:467:39)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
@ ./src/app/organisms/attachment-section/attachment-section.component.ngfactory.js 49:10-86
@ ./src/app/xxx/additional.component.ngfactory.js
@ ./src/app/xxx/xxx.module.ngfactory.js
@ ./$$_lazy_route_resource lazy
@ ./node_modules/@angular/core/fesm5/core.js
@ ./src/environments/environment.ts
@ ./src/main.browser.ts
@ multi (webpack)-dev-server/client?http://localhost:3000 ./src/main.browser.ts
package.json
{
"name": "angular-starter",
"version": "7.0.0",
"description": "An Angular Webpack Starter kit featuring Angular (Router, Http, Forms, Services, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, TypeScript, and Webpack by AngularClass",
"keywords": [
"angular",
"angular2",
"angular4",
"angular5",
"webpack",
"typescript",
"tipe",
"tipe.io"
],
"author": "Patrick Stapleton <patrick@tipe.io>",
"homepage": "https://github.com/gdi2290/angular-starter",
"license": "MIT",
"scripts": {
"build:aot:prod": "npm run clean:dist && npm run clean:aot && cross-env BUILD_AOT=1 npm run webpack -- --config config/webpack.prod.js --progress --profile --bail",
"build:aot": "npm run build:aot:prod",
"build:aot:dev": "cross-env BUILD_AOT=1 npm run build:dev",
"build:dev": "npm run clean:dist && npm run webpack -- --config config/webpack.dev.js --progress --profile",
"build:docker": "npm run build:prod && docker build -t angular2-webpack-start:latest .",
"build:prod": "npm run clean:dist && npm run webpack -- --config config/webpack.prod.js --progress --profile --bail",
"build": "npm run build:dev",
"ci:aot": "cross-env BUILD_E2E=1 npm run lint && npm run test && npm run build:aot && npm run e2e",
"ci:jit": "cross-env BUILD_E2E=1 npm run lint && npm run test && npm run build:prod && npm run e2e",
"ci:nobuild": "npm run lint && npm test && npm run e2e",
"ci:testall": "cross-env BUILD_E2E=1 npm run lint && npm run test && npm run build:prod && npm run e2e && npm run build:aot && npm run e2e",
"ci:travis": "cross-env BUILD_E2E=1 npm run lint && npm run test && npm run build:aot && npm run e2e:travis",
"ci": "npm run ci:testall",
"clean:dll": "npm run rimraf -- dll",
"clean:aot": "npm run rimraf -- compiled",
"clean:dist": "npm run rimraf -- dist",
"clean:install": "npm set progress=false && npm install",
"clean": "npm cache clean --force && npm run rimraf -- node_modules doc coverage dist compiled dll",
"docker": "docker",
"docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/",
"docs:compodoc": "compodoc -p tsconfig.json",
"docs:compodoc:serve": "compodoc -p tsconfig.json -s",
"docs:compodoc:serve:watch": "compodoc -p tsconfig.json -s -w",
"e2e:live": "npm-run-all -p -r server:prod:ci protractor:live",
"e2e:travis": "npm-run-all -p -r server:prod:ci protractor:delay",
"e2e": "npm-run-all -p -r server:prod:ci protractor",
"github-deploy:dev": "npm run webpack -- --config config/webpack.github-deploy.js --progress --profile --env.githubDev",
"github-deploy:prod": "npm run webpack -- --config config/webpack.github-deploy.js --progress --profile --env.githubProd",
"github-deploy": "npm run github-deploy:dev",
"lint": "npm run tslint \"src/**/*.ts\"",
"node": "node",
"postinstall": "",
"unused_postinstall": "npm run webdriver:update",
"postversion": "git push && git push --tags",
"preclean:install": "npm run clean",
"preversion": "npm test",
"protractor": "protractor",
"protractor:delay": "sleep 3 && npm run protractor",
"protractor:live": "protractor --elementExplorer",
"rimraf": "rimraf",
"server:dev:hmr": "npm run server:dev -- --hotOnly",
"server:aot:dev": "cross-env BUILD_AOT=1 npm run server:dev",
"server:dev": "npm run webpack-dev-server -- --config config/webpack.dev.js --open --progress --profile --watch --content-base src/",
"server:prod": "http-server dist -c-1 --cors",
"server:prod:ci": "http-server dist -p 3000 -c-1 --cors",
"server": "npm run server:dev",
"start:hmr": "npm run server:dev:hmr",
"start": "npm run server:aot:dev",
"start:jit": "npm run server:dev",
"start:aot": "npm run server:aot:dev",
"test": "npm run lint && karma start",
"tslint": "tslint",
"typedoc": "typedoc",
"version": "npm run build",
"watch:dev:hmr": "npm run watch:dev -- --hot",
"watch:dev": "npm run build:dev -- --watch",
"watch:aot:dev": "npm run build:aot:dev -- --watch",
"watch:prod": "npm run build:prod -- --watch",
"watch:aot:prod": "npm run build:aot:prod -- --watch",
"watch:test": "npm run test -- --auto-watch --no-single-run",
"watch": "npm run watch:dev",
"webdriver-manager": "node ./node_modules/protractor/bin/webdriver-manager",
"webdriver:start": "node ./node_modules/protractor/bin/webdriver-manager start",
"webdriver:update": "node ./node_modules/protractor/bin/webdriver-manager update",
"webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
"webpack": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js"
},
"dependencies": {
"@angular-redux/form": "^6.0.0",
"@angular-redux/router": "^6.0.0",
"@angular-redux/store": "^6.0.0",
"@angular/animations": "^6.0.0-rc.1",
"@angular/cdk": "5.2.4",
"@angular/common": "^6.0.0-rc.1",
"@angular/compiler": "6.0.0-rc.1",
"@angular/core": "^6.0.0-rc.1",
"@angular/forms": "^6.0.0-rc.1",
"@angular/http": "^6.0.0-rc.1",
"@angular/material": "^5.2.4",
"@angular/platform-browser": "^6.0.0-rc.1",
"@angular/platform-browser-dynamic": "^6.0.0-rc.1",
"@angular/platform-server": "^6.0.0-rc.1",
"@angular/router": "^6.0.0-rc.1",
"@angularclass/conventions-loader": "^1.0.2",
"@angularclass/hmr": "~1.2.2",
"@angularclass/hmr-loader": "~3.0.2",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.27",
"@ngui/auto-complete": "^0.13.8",
"@types/file-saver": "0.0.1",
"@types/jsonpath": "^0.2.0",
"@types/moment": "^2.13.0",
"@types/moment-timezone": "^0.5.4",
"@types/ramda": "^0.24.13",
"angular2-busy": "https://github.com/Sky4CE/angular2-busy/tarball/static-template",
"angular2-datatable": "^0.6.0",
"angular2-modal": "^2.0.3",
"angular2-moment": "^1.3.3",
"bootstrap": "^4.0.0-alpha.6",
"core-js": "^2.5.1",
"file-saver": "^1.3.3",
"font-awesome": "^4.7.0",
"http-server": "^0.9.0",
"ie-shim": "^0.1.0",
"immutable": "^3.8.2",
"jasmine-core": "^2.5.2",
"js-beautify": "1.6.14",
"jsonpath": "^1.0.0",
"moment": "2.18.1",
"moment-timezone": "^0.5.4",
"ng2-currency-mask": "^4.4.1",
"ng2-data-table": "^1.0.0",
"ng2-file-upload": "^1.2.1",
"ng2-select": "^1.2.0",
"ng2-sticky-kit": "^5.0.0",
"ngx-permissions": "2.1.0",
"ngx-pipes": "^2.1.0",
"ngx-uploader": "^4.2.4",
"object-path-immutable": "^0.5.1",
"primeng": "^2.0.0",
"rambda": "0.9.3",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
"redux-observable": "^0.18.0",
"reflect-metadata": "^0.1.10",
"rxjs": "^5.6.0-forward-compat.1",
"sprintf-js": "^1.1.1",
"tinymce": "^4.7.4",
"zone.js": "^0.8.20"
},
"devDependencies": {
"@angular-devkit/build-optimizer": "^0.0.32",
"@angular/compiler-cli": "^6.0.0-rc.1",
"@compodoc/compodoc": "^1.0.0-beta.15",
"@ngtools/webpack": "^1.10.2",
"@types/hammerjs": "^2.0.34",
"@types/jasmine": "2.5.45",
"@types/node": "^7.0.39",
"@types/selenium-webdriver": "~2.53.39",
"@types/source-map": "^0.5.0",
"@types/uglify-js": "^2.6.28",
"@types/webpack": "^2.2.16",
"add-asset-html-webpack-plugin": "^1.0.2",
"angular-ide": "^0.9.19",
"angular2-template-loader": "^0.6.2",
"assets-webpack-plugin": "^3.5.1",
"awesome-typescript-loader": "^3.3.0",
"codelyzer": "~2.1.1",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^5.0.0",
"css-loader": "^0.28.0",
"exports-loader": "^0.6.4",
"expose-loader": "^0.7.3",
"extract-text-webpack-plugin": "~3.0.0",
"file-loader": "^0.11.1",
"find-root": "^1.0.0",
"gh-pages": "^1.0.0",
"html-webpack-plugin": "^2.28.0",
"imports-loader": "^0.7.1",
"inline-manifest-webpack-plugin": "^3.0.1",
"istanbul-instrumenter-loader": "2.0.0",
"jasmine-core": "^2.5.2",
"json-loader": "^0.5.4",
"karma": "^1.6.0",
"karma-browserify": "^5.1.1",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.1.1",
"karma-mocha-reporter": "^2.2.3",
"karma-remap-coverage": "^0.1.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.4",
"ng-router-loader": "^2.1.0",
"ngc-webpack": "^4.0.2",
"node-sass": "^4.5.2",
"npm-run-all": "^4.0.2",
"optimize-js-plugin": "0.0.4",
"parse5": "^3.0.2",
"preload-webpack-plugin": "^1.2.2",
"protractor": "^5.1.1",
"raw-loader": "0.5.1",
"rimraf": "~2.6.1",
"sass-loader": "^6.0.3",
"script-ext-html-webpack-plugin": "^1.8.5",
"source-map-loader": "^0.2.1",
"string-replace-loader": "~1.3.0",
"style-loader": "^0.18.1",
"to-string-loader": "^1.1.5",
"ts-helpers": "1.1.2",
"ts-node": "^3.3.0",
"tslib": "^1.7.1",
"tslint": "~4.5.1",
"tslint-loader": "^3.5.2",
"typedoc": "^0.7.1",
"typescript": "2.7.2",
"uglifyjs-webpack-plugin": "^1.0.1",
"url-loader": "^0.5.8",
"webpack": "^3.8.1",
"webpack-dev-middleware": "^1.10.1",
"webpack-dev-server": "~2.7.1",
"webpack-dll-bundles-plugin": "^1.0.0-beta.5",
"webpack-merge": "~4.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/gdi2290/angular-starter.git"
},
"bugs": {
"url": "https://github.com/gdi2290/angular-starter/issues"
},
"engines": {
"node": ">= 4.2.1",
"npm": ">= 3"
}
}
555
I have the same problem with "@angular/core": "6.0.4"
and "ngx-uploader": "^6.0.0"
.
WIth the previous version of "ngx-uploader": "^4.2.1"
it is working fine.
I have the same issue with "@angular/core": "6.0.5"
I was have the same issue with angular 6 and i found the problem ... import "NgxUploaderModule" not "NgUploaderModule" import { NgxUploaderModule } from 'ngx-uploader'; now its worked
@ahmedwerpx's solution worked for me. @jkuri it looks like the docs need to be updated to:
import { NgxUploaderModule } from 'ngx-uploader';
rather than:
import { NgUploaderModule } from 'ngx-uploader';
I see, thanks ... I'll update it soon.
I have the same problems, i have 6.0.1 but I am not be able to import, Cannot find ngx-uploader.module all the time I try import { NgxUploaderModule } from 'ngx-uploader';
@pelirroja191186 you might also need to change from NgUploaderModule to NgxUploaderModule in your "imports" section of your NgModule
thanks, i'll try En viernes, 29 de junio de 2018 9:07:29 CEST, Axel Bodart notifications@github.com escribió:
@pelirroja191186 you might also need to change from NgUploaderModule to NgxUploaderModule in your "imports" section of your NgModule
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I forked the repo and did some changes to work, However, I am getting these issues in these cases. I followed this link https://github.com/angular/angular-cli/issues/8284 My forked repo I updated
tsconfig.app.json
include"include": [ "../node_modules/ngx-uploader/index.ts" ],
or"include": [ "../node_modules/ngx-uploader/src/ngx-uploader/**/*.ts", "../node_modules/ngx-uploader/index.ts" ],
ERROR in node_modules/ngx-uploader/index.ts(1,15): error TS2307: Cannot find module './src/ngx-uploader/module/ngx-uploader.module'. node_modules/ngx-uploader/index.ts(2,15): error TS2307: Cannot find module './src/ngx-uploader/classes/ngx-uploader.class'. node_modules/ngx-uploader/index.ts(3,102): error TS2307: Cannot find module './src/ngx-uploader/classes/interfaces'. node_modules/ngx-uploader/index.ts(4,15): error TS2307: Cannot find module './src/ngx-uploader/directives/ng-file-select.directive'. node_modules/ngx-uploader/index.ts(5,15): error TS2307: Cannot find module './src/ngx-uploader/directives/ng-file-drop.directive'.Getting this error if I delete include in
tsconfig.app.json
If I use the main repo there are errors. AmI missing any?ERROR in node_modules/ngx-uploader/index.ts(1,15): error TS2307: Cannot find module './src/ngx-uploader/module/ngx-uploader.module'. node_modules/ngx-uploader/index.ts(2,15): error TS2307: Cannot find module './src/ngx-uploader/classes/ngx-uploader.class'. node_modules/ngx-uploader/index.ts(3,102): error TS2307: Cannot find module './src/ngx-uploader/classes/interfaces'. node_modules/ngx-uploader/index.ts(4,15): error TS2307: Cannot find module './src/ngx-uploader/directives/ng-file-select.directive'. node_modules/ngx-uploader/index.ts(5,15): error TS2307: Cannot find module './src/ngx-uploader/directives/ng-file-drop.directive'. src/app/app.module.ts(10,10): error TS2305: Module '"E:/frontend-app/node_modules/ngx-uploader/index"' has no exported member 'NgUploaderModule'. src/app/create-article/create-article.component.ts(2,48): error TS2305: Module '"E:/frontend-app/node_modules/ngx-uploader/index"' has no exported member 'humanizeBytes'. src/app/create-group/create-group.component.ts(8,49): error TS2305: Module '"E:/frontend-app/node_modules/ngx-uploader/index"' has no exported member 'humanizeBytes'. src/app/edit-article/edit-article.component.ts(2,48): error TS2305: Module '"E:/frontend-app/node_modules/ngx-uploader/index"' has no exported member 'humanizeBytes'. src/app/edit-group/edit-group.component.ts(8,49): error TS2305: Module '"E:/New folder/frontend-app/node_modules/ngx-uploader/index"' has no exported member 'humanizeBytes'. src/app/user-profile-edit/user-profile-edit.component.ts(10,49): error TS2305: Module '"E:/frontend-app/node_modules/ngx-uploader/index"' has no exported member 'humanizeBytes'.