ObaidUrRehman / ng-drag-drop

Drag & Drop for Angular - based on HTML5 with no external dependencies. :tada:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR in Error: Unexpected value 'Draggable in ./node_modules/ng2-drag-drop/src/directives/draggable.directive.d.ts' declared by the module 'Ng2DragDropModule in ./node_modules/ng2-drag-drop/src/ng2-drag-drop.module.d.ts'. Please add a @Pipe/@Directive/@Component annotation.

MarkKewley opened this issue · comments

Seems to have just showed up with our recent build using angluar-cli:
e.g.:
ng build --prod

ERROR in Error: Unexpected value 'Draggable in ./node_modules/ng2-drag-drop/src/directives/draggable.directive.d.ts' declared by the module 'Ng2DragDropModule in ./node_modules/ng2-drag-drop/src/ng2-drag-drop.module.d.ts'. Please add a @Pipe/@Directive/@Component annotation. at Error (native) at syntaxError (/opt/atlassian/pipelines/agent/build/node_modules/@angular/compiler/bundles/compiler.umd.js:1725:34) at ./node_modules/@angular/compiler/bundles/compiler.umd.js:15465:40 at Array.forEach (native) at CompileMetadataResolver.getNgModuleMetadata (/opt/atlassian/pipelines/agent/build/node_modules/@angular/compiler/bundles/compiler.umd.js:15447:54) at addNgModule (/opt/atlassian/pipelines/agent/build/node_modules/@angular/compiler/bundles/compiler.umd.js:24241:58) at ./node_modules/@angular/compiler/bundles/compiler.umd.js:24252:14 at Array.forEach (native) at _createNgModules (/opt/atlassian/pipelines/agent/build/node_modules/@angular/compiler/bundles/compiler.umd.js:24251:26) at analyzeNgModules (/opt/atlassian/pipelines/agent/build/node_modules/@angular/compiler/bundles/compiler.umd.js:24126:14) at analyzeAndValidateNgModules (/opt/atlassian/pipelines/agent/build/node_modules/@angular/compiler/bundles/compiler.umd.js:24136:35) at AotCompiler.analyzeModulesAsync (/opt/atlassian/pipelines/agent/build/node_modules/@angular/compiler/bundles/compiler.umd.js:23772:46) at CodeGenerator.codegen (/opt/atlassian/pipelines/agent/build/node_modules/@angular/compiler-cli/src/codegen.js:32:14) at Function.NgTools_InternalApi_NG_2.codeGen (/opt/atlassian/pipelines/agent/build/node_modules/@angular/compiler-cli/src/ngtools_api.js:73:30) at _donePromise.Promise.resolve.then (/opt/atlassian/pipelines/agent/build/node_modules/@ngtools/webpack/src/plugin.js:386:44)

@MarkKewley what version of Angular/CLI are you using?

^1.0.0 which resolves to 1.4.1 currently

Note with 2.6.0 drag-drop we do not have this issue

Fixed in v2.8.0. It was a build issue.
Sorry for the inconvenience.

Thanks Obaid, just verified appears to work now