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

agm-direction.module.ts is missing from the TypeScript #9

Closed
Gajendrasinh opened this issue Mar 5, 2018 · 7 comments
Closed

agm-direction.module.ts is missing from the TypeScript #9

Gajendrasinh opened this issue Mar 5, 2018 · 7 comments

Comments

@Gajendrasinh
Copy link

How can i solve this error,

ERROR in ./node_modules/agm-direction/src/agm-direction.module.ts
Module build failed: Error: /Users/gajendra/Documents/Demo/google-map-tracking/node_modules/agm-direction/src/agm-direction.module.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
at AngularCompilerPlugin.getCompiledFile (/Users/gajendra/Documents/Demo/google-map-tracking/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:663:23)
at plugin.done.then (/Users/gajendra/Documents/Demo/google-map-tracking/node_modules/@ngtools/webpack/src/loader.js:467:39)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
@ ./node_modules/agm-direction/index.js 6:9-46
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

@explooosion
Copy link
Owner

explooosion commented Mar 5, 2018

Please include it in tsconfig.app.json.

{
  "include": [
    "../src/*",
    "../node_modules/agm-direction/*"
  ]
}  

@Toso82
Copy link

Toso82 commented Mar 9, 2018

I have the same problem

tsconfig.app.json:

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "module": "es2015",
    "baseUrl": "",
    "types": []

  },
  "include": [
    "../src/*",
    "./node_modules/agm-direction/*"
  ],
  "exclude": [
    "test.ts",
    "**/*.spec.ts"
  ]

}

ERROR in ./node_modules/agm-direction/src/agm-direction.module.ts
Module build failed: Error: C:\Users\xx\Documents\Visual Studio 2017\Projects\test\my-app\node_modules\agm-direction\src\agm-direction.module.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
    at AngularCompilerPlugin.getCompiledFile (C:\Users\xx\Documents\Visual Studio 2017\Projects\test\my-app\node_modules\@angular\cli\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:674:23)
    at plugin.done.then (C:\Users\xx\Documents\Visual Studio 2017\Projects\test\my-app\node_modules\@angular\cli\node_modules\@ngtools\webpack\src\loader.js:467:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)

What i have to do to use this library? Thanks @explooosion

@explooosion
Copy link
Owner

Hola! @Toso82
May be your path is incorrect.

  • tsconfig.app.json
"../node_modules/agm-direction/*"

@alobban
Copy link

alobban commented Mar 13, 2018

I have the same issue as @Toso82 the path is not incorrect. My issue stems from me using the package in a nested component in an existing project. However, when I built a sample app it worked!! Stackblitz

I can't seem to figure out how to resolve the issue.

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "baseUrl": "./",
    "module": "es2015",
    "types": []
  },
  "include": [
    "../src/*",
    "../node_modules/agm-direction/*"
  ],
  "exclude": [
    "test.ts",
    "**/*.spec.ts"
  ]
}

Is there a proper fix coming for this?

@alobban
Copy link

alobban commented Mar 14, 2018

Fixed my issue with this line modification in tsconfig.app.json:

"../node_modules/agm-direction/**/*"

@explooosion
Copy link
Owner

@alobban Thanks for all your help. 🙂

@explooosion
Copy link
Owner

explooosion commented Mar 17, 2018

Hello, everyone! 🙂

I have rebuild the project with generator-angular2-library, and it seems to be ok.

Install

Please install the latest version 0.4.0 :

npm version

npm install agm-direction@0.4.0

or

npm install agm-direction@latest

Setting

Please don't set anything in tsconfig.app.json ~~ 😃

Test Environment

$ ng -v

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.7.3
Node: 8.10.0
OS: win32 x64
Angular: 5.2.9

Document

The generator-angular2-library also generates the document.
Check out here (https://robby570.tw/Agm-Direction/).

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

No branches or pull requests

4 participants