Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ts considers files that are excluded while compiling #7360

Closed
lucamorelli opened this issue Mar 3, 2016 · 3 comments
Closed

ts considers files that are excluded while compiling #7360

lucamorelli opened this issue Mar 3, 2016 · 3 comments
Assignees
Labels
Needs More Info The issue still hasn't been fully clarified

Comments

@lucamorelli
Copy link

Hi,
I have an angular2 application done with asp.net 5 rc1, vs, typescript and with packages installed via npm. I reopened the solution after a few weeks, after the update of typescript to 1.8.6.0 and beta 8 version of angular 2.
Since I have all the client packages inside the root node_modules directory, and I need to coy them inside the wwwroot, I use the gulp package gulp-npm-files to copy all the files inside the wwwroot, and so far it worked fine.
Now, if I install the packages via and npm and compile, all is fine, but if I copy the files inside the wwwroot and recompile I have a lot of errors like

Module '"...wwwroot/node_modules/angular2/src/core/linker/interfaces"' has no exported member 'LIFECYCLE_HOOKS_VALUES'.
this is the content of the tsconfig.json

{
  "compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": false,
    "removeComments": false,
    "target": "es5",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "outDir": "wwwroot",
    "module": "amd",
    "inlineSourceMap": true,
    "inlineSources": true,
    "moduleResolution": "node"
  },
  "exclude": [
    "node_modules",
    "wwwroot"
  ]
}

I suppose that all the ts files inside the ts files inside wwwroot are excluded: has everything changed with the new version?

@billti
Copy link
Member

billti commented Mar 3, 2016

I'm having trouble following where this could be going wrong from the above description. Do you have a project you can point me at with the problem?

Also, from the one error message you show, it looks like it is resolving the module path, but it does not contain the exported member expected. I don't know how old your original code is, but are you sure this isn't API changes on the Angular end as they have moved through pre-releases?

@billti billti added the Needs More Info The issue still hasn't been fully clarified label Mar 3, 2016
@billti billti self-assigned this Mar 3, 2016
@lucamorelli
Copy link
Author

I'm uploading at https://dl.dropboxusercontent.com/u/19486794/Samples.zip right now. It's quite huge because I zipped with all the installed packages. Since there are a few node modules with a long file path, you could need to unzip it using sevenzip. I'm updating to the latest bits, but I haven't seen big changes from the last running version. If I don't copy the packages from the app root to the wwwroot compiles fine, the problem start after the copy.
I was cleaning up this project because #7321, since in this solution I have working samples of angular2 and aurelia, and I don't know if this could be of help.

@lucamorelli
Copy link
Author

Actually I solved the problem modifying the copy task making it ignore .ts and tsconfig.json files

@mhegazy mhegazy closed this as completed Mar 29, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests

3 participants