leewinder / ng2-file-drop

An Angular module for simple desktop file drag and drop with automatic file validation and dynamic style adjustment.
MIT License
28 stars 26 forks source link

extra node_modules, Calling function 'makeDecorator', function calls are not supported #8

Closed jimmy-tfp closed 7 years ago

jimmy-tfp commented 7 years ago

Hi,

Thanks for the great module!

Whenever I do a npm install I get a node_modules in my node_modules for this package. i.e.

/code/peck-studio/node_modules/ng2-file-drop
sarcelles:ng2-file-drop jimmy$ ls
LICENSE     directives  index.d.ts  index.js.map    module      package.json    utilities
README.md   dropped-files   index.js    index.ts    node_modules    properties
sarcelles:ng2-file-drop jimmy$ 

which causes this error from "ng-serve":
ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol NgModule in /code/peck-studio/node_modules/ng2-file-drop/node_modules/@angular/core/src/metadata/ng_module.d.ts, resolving symbol NgModule in /code/peck-studio/node_modules/ng2-file-drop/node_modules/@angular/core/src/metadata.d.ts, resolving symbol NgModule in /code/peck-studio/node_modules/ng2-file-drop/node_modules/@angular/core/src/core.d.ts, resolving symbol NgModule in /code/peck-studio/node_modules/ng2-file-drop/node_modules/@angular/core/index.d.ts, resolving symbol FileDropModule in /code/peck-studio/node_modules/ng2-file-drop/module/file-drop.module.ts, resolving symbol FileDropModule in /code/peck-studio/node_modules/ng2-file-drop/module/file-drop.module.ts

When I delete this directory ng-serve works fine.

Thanks, Jimmy

coding2012 commented 7 years ago

Not sure if this was noticed, but the most recent version 0.2.2 still includes a node_modules folder inside the distribution delivered via npm, and is causing the error listed above. I am able to delete node_modules in the included package, but this does not help on our build server that references the package remotely.

ntourne commented 7 years ago

Any update about this issue? I also removed 'node_modules' folder inside as @coding2012 suggests and works fine. Glad to get this fixed on the package. Thanks!

PS - ng2-file-drop is a great solution!

wnabil commented 7 years ago

same here and removing the folder works fine but update this inside the npm package please so we don't need to do this everytime.

leewinder commented 7 years ago

This should be fixed in v1.1.0 - Pull request #29.

Please let me know otherwise and I'll investigate further.