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

can't compile #23

Closed
yasushisakai opened this issue Apr 15, 2019 · 9 comments
Closed

can't compile #23

yasushisakai opened this issue Apr 15, 2019 · 9 comments

Comments

@yasushisakai
Copy link
Contributor

dumping stdout and stderr.
node, npm and ng versions are same as @RELNO

I've done npm audit and npm audit fix and followed instructions but does not resolve.(related to #20)

node --version
v10.15.1

npm --version
6.9.0

ng --version (outside repo)

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

Angular CLI: 7.3.3
Node: 10.15.1
OS: darwin x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.13.3
@angular-devkit/core         7.3.3
@angular-devkit/schematics   7.3.3
@schematics/angular          7.3.3
@schematics/update           0.13.3
rxjs                         6.3.3
typescript                   3.2.4
    

npm install
npm WARN bootstrap@4.3.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.3.1 requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.

audited 42690 packages in 4.377s
found 5 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

ng serve
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

Date: 2019-04-15T21:40:43.171Z
Hash: fe04d38885e92ed92ad7
Time: 6763ms
chunk {es2015-polyfills} es2015-polyfills.js, es2015-polyfills.js.map (es2015-polyfills) 284 kB [initial] [rendered]
chunk {main} main.js, main.js.map (main) 1.87 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 93.1 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 78.2 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 1.05 MB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 327 kB [initial] [rendered]

ERROR in src/app/basemap/moduleDataToMapHandler/grid/grid-three/grid-three.service.ts(31,28): error TS2339: Property 'MercatorCoordinate' does not exist on type 'typeof mapboxgl'.
src/app/basemap/moduleDataToMapHandler/grid/grid-three/grid-three.service.ts(35,28): error TS2339: Property 'MercatorCoordinate' does not exist on type 'typeof mapboxgl'.
src/app/basemap/moduleDataToMapHandler/grid/grid-three/grid-three.service.ts(39,28): error TS2339: Property 'MercatorCoordinate' does not exist on type 'typeof mapboxgl'.

�[34mℹ�[39m �[90m「wdm」�[39m: Failed to compile.
@RELNO
Copy link
Contributor

RELNO commented Apr 15, 2019

Would it compile if you skip the grid-three loading? Also, please clarify this is an Ubuntu issue (for now..)

@janbehrens
Copy link

I've encountered the same error. Looks like no type definitions for mapboxgl are available.
As a temporary workaround you can cast it to 'any' by replacing mapboxgl with (<any>mapboxgl).

@janbehrens
Copy link

janbehrens commented Apr 16, 2019

... and don't worry about the npm audit warnings. They appear frequently. Just make sure you check for new major versions of your packages every now and then.

@yshimbo
Copy link

yshimbo commented Apr 16, 2019

I've encountered same issue on Windows10 64bit.

After failing, I try to update grid-three.service.ts.(Just swapped L16 and L17.)
Then compile process succeeded.
But restarting the process (ng serve), compile failed once again...

Unfortunately, type definition error still remained...

@yasushisakai
Copy link
Contributor Author

@janbehrens thanks for the tip I will come back when tested, I will probably do a PR for this.

@RELNO
Copy link
Contributor

RELNO commented Apr 16, 2019

After failing, I try to update grid-three.service.ts.(Just swapped L16 and L17.)

@ yshimbo did you refer to:

 var modelOrigin = [
      cityiodata.header.spatial.latitude,
      cityiodata.header.spatial.longitude
    ];

?

@yshimbo
Copy link

yshimbo commented Apr 16, 2019

@RELNO
Yes.
But I think swapping those lines is not a problem.
The sequence what I did is
ng serve -> compile failed -> modify 'grid-three.service.ts' -> compile success -> terminate 'ng serve' process -> ng serve (once again) -> compile failed.

-Reason of swapping the lines.
As far as reading mapbox reference, the sequence of parameters of MercatorCoordinatefromLngLat is {lng, lat}.
(Sorry. this is different matter from "compile failed")

@RELNO
Copy link
Contributor

RELNO commented Apr 16, 2019

@yshimbo thanks for the in sight, I'll follow this format.

@RELNO
Copy link
Contributor

RELNO commented Apr 17, 2019

Closing for now per @janbehrens solution.

@RELNO RELNO closed this as completed Apr 17, 2019
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

4 participants