Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Variable error while serving the code with Quick start #2

Open
siva2sachin opened this issue Feb 26, 2017 · 9 comments
Open

Variable error while serving the code with Quick start #2

siva2sachin opened this issue Feb 26, 2017 · 9 comments

Comments

@siva2sachin
Copy link

When run the code, getting below error, Could you please help me on this.

node_modules/@uniprank/ng2-file-uploader/module/source/fileManager.core.ts(251,1
3): error TS7005: Variable '_uploader' implicitly has an 'any' type.
node_modules/@uniprank/ng2-file-uploader/module/source/protocol.core.ts(129,13):
error TS7005: Variable '_request' implicitly has an 'any' type.
node_modules/@uniprank/ng2-file-uploader/module/source/protocol.core.ts(173,13):
error TS7005: Variable 'sendable' implicitly has an 'any' type.
node_modules/@uniprank/ng2-file-uploader/module/source/transfer.core.ts(440,31):
error TS7005: Variable 'key' implicitly has an 'any' type.
node_modules/@uniprank/ng2-file-uploader/module/source/transfer.core.ts(440,36):
error TS7005: Variable 'val' implicitly has an 'any' type.
node_modules/@uniprank/ng2-file-uploader/module/source/transfer.core.ts(440,41):
error TS7005: Variable 'i' implicitly has an 'any' type.

@Denfie
Copy link
Member

Denfie commented Feb 26, 2017

Hey sivi2sachin,

I changed my implementation for ES6 validation.
Could you send me your tsconfig.json I think it's a part of your target. There is ES5 defined.
Did you use TS 2.2.1 or an older version?

Denfie added a commit that referenced this issue Feb 26, 2017
Denfie added a commit that referenced this issue Feb 26, 2017
Get nevest version 0.1.9 from development with fixed issue (#2)
@Denfie
Copy link
Member

Denfie commented Feb 26, 2017

Hi sivi2sachin,

I upload a new fix for your problem. Try the version 0.1.9

npm install @uniprank/ng2-file-uploader@latest --save

Hopefully it fixed your little problem.

@siva2sachin
Copy link
Author

Thanks Denfie. It's fixed the problem!! Also Can you please let me know map settings to be used in Systemjs.config.js file,
'@uniprank/ng2-file-uploader' : 'npm:@uniprank/ng2-file-uploader/???

While serve, the traceur is coming as 404. [1] 17.02.26 01:16:58 404 GET /traceur

@Denfie
Copy link
Member

Denfie commented Feb 26, 2017

Hi,

i don't have currently a bundle .js file. I will create this today and push a newer version later.

@siva2sachin
Copy link
Author

Thanks Denfie.

Denfie added a commit that referenced this issue Feb 27, 2017
put bundle for system.config.js (#2) && example update
@Denfie
Copy link
Member

Denfie commented Feb 27, 2017

Hi siva2sachin,

now you can include this to your Systemjs.config.js like this:

// map tells the System loader where to look for things
map: {
    ...
    '@uniprank/ng2-file-uploader': 'node_modules/@uniprank/ng2-file-uploader/bundles/ng2-file-uploader.umd.js',
    ...
}

I hope it works ;-)

@siva2sachin
Copy link
Author

Thanks Denfie. It's working. But However while running at the browser, it's throwing an error after added the FileUploaderModule into the @NgModule section,

Below is the error,
(...)
originalErr
:
SyntaxError: Unexpected token < at eval () at SystemJSLoader.__exec (http://localhost:3000/node_modules/systemjs/dist/system.src.js:1555:18) at entry.execute (http://localhost:3000/node_modules/systemjs/dist/system.src.js:3753:16) at linkDynamicModule (http://localhost:3000/node_modules/systemjs/dist/system.src.js:3300:32) at getModule (http://localhost:3000/node_modules/systemjs/dist/system.src.js:3268:9) at http://localhost:3000/node_modules/systemjs/dist/system.src.js:3304:16 at require (http://localhost:3000/node_modules/systemjs/dist/system.src.js:3999:29) at Object.eval (http://localhost:3000/app/app.module.js:14:27) at eval (http://localhost:3000/app/app.module.js:30:4) at eval (http://localhost:3000/app/app.module.js:31:3) at eval () at SystemJSLoader.__exec (http://localhost:3000/node_modules/systemjs/dist/system.src.js:1555:18) at entry.execute (http://localhost:3000/node_modules/systemjs/dist/system.src.js:4035:18) at linkDynamicModule (http://localhost:3000/node_modules/systemjs/dist/system.src.js:3300:32) at getModule (http://localhost:3000/node_modules/systemjs/dist/system.src.js:3268:9)

zone_symbol__error
:
Error: (SystemJS) Unexpected token < SyntaxError: Unexpected token < at eval () at Object.eval (http://localhost:3000/app/app.module.js:14:27) at eval (http://localhost:3000/app/app.module.js:30:4) at eval (http://localhost:3000/app/app.module.js:31:3) at eval () Evaluating http://localhost:3000/node_modules/@uniprank/ng2-file-uploader/bundles/ng2-file-uploader.umd.js Evaluating http://localhost:3000/app/app.module.js Evaluating http://localhost:3000/main.js Error loading http://localhost:3000/main.js at eval () at Object.eval (http://localhost:3000/app/app.module.js:14:27) at eval (http://localhost:3000/app/app.module.js:30:4) at eval (http://localhost:3000/app/app.module.js:31:3) at eval () Evaluating http://localhost:3000/node_modules/@uniprank/ng2-file-uploader/bundles/ng2-file-uploader.umd.js Evaluating http://localhost:3000/app/app.module.js Evaluating http://localhost:3000/main.js Error loading http://localhost:3000/main.js at addToError (http://localhost:3000/node_modules/systemjs/dist/system.src.js:122:78) [] at linkSetFailed (http://localhost:3000/node_modules/systemjs/dist/system.src.js:687:15) [] at http://localhost:3000/node_modules/systemjs/dist/system.src.js:624:9 [] at doDynamicExecute (http://localhost:3000/node_modules/systemjs/dist/system.src.js:769:7) [] at link (http://localhost:3000/node_modules/systemjs/dist/system.src.js:964:20) [] at doLink (http://localhost:3000/node_modules/systemjs/dist/system.src.js:623:7) [] at updateLinkSetOnLoad (http://localhost:3000/node_modules/systemjs/dist/system.src.js:669:18) [] at http://localhost:3000/node_modules/systemjs/dist/system.src.js:485:11 [] at Zone.run (http://localhost:3000/node_modules/zone.js/dist/zone.js:126:43) [ => ] at http://localhost:3000/node_modules/zone.js/dist/zone.js:679:57 [] at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:166:47) [ => ] at drainMicroTaskQueue (http://localhost:3000/node_modules/zone.js/dist/zone.js:529:35) []
__zone_symbol__stack
:
"(SystemJS) Unexpected token <↵ SyntaxError: Unexpected token <↵ at eval ()↵ at Object.eval (http://localhost:3000/app/app.module.js:14:27)↵ at eval (http://localhost:3000/app/app.module.js:30:4)↵ at eval (http://localhost:3000/app/app.module.js:31:3)↵ at eval ()↵ Evaluating http://localhost:3000/node_modules/@uniprank/ng2-file-uploader/bundles/ng2-file-uploader.umd.js↵ Evaluating http://localhost:3000/app/app.module.js↵ Evaluating http://localhost:3000/main.js↵ Error loading http://localhost:3000/main.js"
message
:
(...)

Denfie added a commit that referenced this issue Feb 27, 2017
put js.map for bundle (#2) part missing
Denfie added a commit that referenced this issue Feb 27, 2017
Fixed issue (#2) webpack and systemjs loader
@Denfie
Copy link
Member

Denfie commented Feb 27, 2017

hey siva2sachin,

I upload a newer version please use now systemjs loader umd file:

bundles/ng2-file-uploader.systemjs.umd.js

My other bundle was a webpack bundle maybe there was the problem.

@siva2sachin
Copy link
Author

Hi Denfie, Thank you so much for kind help. Could you please upload the .ts code for the Examples sections as I could see the .js bundle files.
So that I can have better understanding on the examples sections to learn completely. Thanks for your help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants