TerriaJS / TerriaMap

Catalog-based web geospatial visualisation platform.
https://terria.io
Apache License 2.0
332 stars 259 forks source link

Module not found #654

Open shipettos opened 11 months ago

shipettos commented 11 months ago

I am trying to build a new TerriaMap/TerriaJS project using this tutorial :

https://docs.terria.io/guide/contributing/development-environment/

The build is successfully done, but when trying to run

yarn gulp clean yarn gulp

I am getting errors like these : Module not found

`yarn run v1.18.0 $ gulp clean Error: Cannot find module 'plugin-error' Require stack:

I haven't made any changes to the gulpfile, package.json etc. Any ideas?

Thanks in advance

nf-s commented 11 months ago

Hi @shipettos

I tried running through the tutorial on my local machine and got no errors - I am using a M2 Macbook with NodeJS v18.6.0

Can you please provide details of your machine - OS version and NodeJS version

Thanks, Nick

shipettos commented 11 months ago

Hello @nf-s

I am using nodeJS v v14.21.3, Windows 11 Business Build 22621

shipettos commented 11 months ago

I now used nodeJS 18, as you did. Still no luck.

Also, I removed the custom terriajs from the packages folder. I did yarn install - works fine yarn gulp

and gives this : root@62c0ab104292:/app# yarn gulp yarn run v1.18.0 $ gulp /bin/sh: 1: gulp: not found error Command failed with exit code 127.

The "Error: Cannot find module 'plugin-error'" disappeared, though. I got confused to be honest.

nf-s commented 11 months ago

Hi @shipettos

Can you please post the output of yarn install? It looks like some packages aren't being installed properly

Thanks!

shipettos commented 11 months ago

Yes, here it is :

$ docker exec -it inicosia-terriamap bash root@93e910d364d9:/app# yarn install yarn install v1.18.0 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... info fsevents@2.3.3: The platform "linux" is incompatible with this module. info "fsevents@2.3.3" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform "linux" is incompatible with this module. info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. [4/5] Linking dependencies... warning " > fork-ts-checker-notifier-webpack-plugin@6.0.0" has incorrect peer dependency "fork-ts-checker-webpack-plugin@^7.0.0". warning "terriajs > react-datepicker@0.53.0" has incorrect peer dependency "react@^0.14.0 || ^15.0.0". warning "terriajs > react-datepicker@0.53.0" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0". warning "terriajs > styled-components@5.3.11" has unmet peer dependency "react-is@>= 16.8.0". [##################################################################################################################################----] 44522/45731f[##################################################################################################################################----] 44527/45731f[###################################################################################################################################---] 44539/45731f[###################################################################################################################################---] 44616/45[###################################################################################################################################---] 44628/45731=[###################################################################################################################################---] 44634/45731=[###################################################################################################################################---] 44646/45731=[###################################################################################################################################---] 44654/45731=[###################################################################################################################################---] 44667/45731=[###################################################################################################################################---] 44673/45731=[###################################################################################################################################---] 44705/45731d[5/5] Building fresh packages... success Saved lockfile. warning Your current version of Yarn is out of date. The latest version is "1.22.19", while you're on "1.18.0". $ echo 'Installation successful. What to do next:\n yarn gulp dev # Starts the server on port 3001, builds TerriaMap and dependencies, and rebuilds if files change.' Installation successful. What to do next: yarn gulp dev # Starts the server on port 3001, builds TerriaMap and dependencies, and rebuilds if files change. Done in 403.58s.