TerriaMap icon indicating copy to clipboard operation
TerriaMap copied to clipboard

Module not found

Open shipettos opened this issue 2 years ago • 5 comments

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:

  • /app/gulpfile.js
  • /app/node_modules/gulp-cli/lib/shared/require-or-import.js
  • /app/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
  • /app/node_modules/gulp-cli/index.js
  • /app/node_modules/gulp/bin/gulp.js`

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

Thanks in advance

shipettos avatar Dec 05 '23 12:12 shipettos

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

nf-s avatar Dec 06 '23 06:12 nf-s

Hello @nf-s

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

shipettos avatar Dec 06 '23 07:12 shipettos

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.

shipettos avatar Dec 06 '23 09:12 shipettos

Hi @shipettos

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

Thanks!

nf-s avatar Dec 07 '23 01:12 nf-s

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 [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. [4/5] Linking dependencies... warning " > [email protected]" has incorrect peer dependency "fork-ts-checker-webpack-plugin@^7.0.0". warning "terriajs > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0". warning "terriajs > [email protected]" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0". warning "terriajs > [email protected]" 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.

shipettos avatar Dec 07 '23 07:12 shipettos