Open vedantkarande93 opened 6 years ago
Due to angular-cli
issues, you must add the module manually to your tsconfig.json
:
{
/* ... config ... */
"include": [
/* ... project files paths ... */,
"node_modules/angular4-files-upload/index.ts"
]
}
This above Lines are giving me an error and I have added these link in the tsconfig.json file like below;
{ "compilerOptions": { "baseUrl": "", "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": [ "es2016", "dom" ], "mapRoot": "./", "module": "es2015", "moduleResolution": "node", "outDir": "../dist/out-tsc", "sourceMap": true, "target": "es5", "typeRoots": [ "../node_modules/@types" ], "include": [ / ... project files paths ... / "node_modules/angular4-files-upload/index.ts" ] } }
Throwing an error of
error TS5023: Unknown compiler option 'include'
@vedantkarande93 include
is not a part of compilerOptions
, you should define it outside.
Please see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html for examples.
How to solve this issue?
@jlobaton With angular5, I met 'ERROR in Error: Error encountered resolving symbol values statically'.
This app is actually wrapping 'ng4-files' module inside. So, this way seems safer.
@mjurczyk I did add 'angular4-files-upload/index.ts' into tsconfig file, then I got this error: 'angular4-files-upload/src/index.ts' is not part of the compilation output. After also adding this one, then I got a new error: 'angular4-files-upload/src/app/index.ts' is not part of ....... It just kept looking for another index file inside. SO Strange
If you specifically add an include statement, you also need to add your other source files, so that angular cli can find everything. (also double check the path to the angular 4 files upload component) e.g.: "include": [ "node_modules/angular4-files-upload/index.ts", "src/*/.ts ]
Added it to tsconfig.app.json instead of tsconfig.json ...
{ "compileOnSave": false, "compilerOptions": { "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "es5", "typeRoots": [ "node_modules/@types" ], "lib": [ "es2017", "dom" ] }, "include": [ "node_modules/angular4-files-upload/index.ts" ] }
Do I have to manually upload the ng4-files folder into the project? I cannot get the desired output. Just keep getting: ERROR in Error: No NgModule metadata found for 'AppModule'.
I downloaded your project, copy/pasted the ng4-files into my components folder and the errors went away. Referencing the node modules folder was not working in my Angular CLI (5.0.3) project. This is not good for maintenance purposes but I wasn't looking to re-create the wheel anyways so Thank you.
It is working in the angular version 4.4.4 but while updating angular version to 5, it is showing
How to solve this issue?