mdenet / educationplatform

Eclipse Public License 2.0
2 stars 3 forks source link

Platform local build metro4 import not found #108

Closed barnettwilliam closed 9 months ago

barnettwilliam commented 10 months ago

The metro4 import does is not resolved but can be imported with import '../../node_modules/metro4/build/metro.js' as reported by pull request #105.

This should be being resolved to the metro4 name and not have to be imported by its full path to the node modules directory.

barnettwilliam commented 10 months ago

I cannot reproduce the error using the current version of the platform e31d440e09101c5605292a05822f1fc570987768, even when building from different sub-directories within the repository. I tested on a clean windows installation and also tested with an updated version of Node with no change.

I do see the error when using the suggested fix - import '../../node_modules/metro4/build/metro.js' from https://github.com/yamtl/educationplatform/tree/yamtl-playground-08112023 but putting this back to metro4 the platform builds successfully.

@arturboronat could you provide any further details on your environment and build command you are using. Also if you can try building in a virtual machine to see if you see the same.

Some version info used for testing:

Version

Original

Node v18.6.0 NPM v9.5.1

Updated

Node - 20.9.1 NPM - 10.1.0

NPM packages

C:\Users\Will\git\yamtl\educationplatform\platform>npm -g list C:\Users\Will\AppData\Roaming\npm +-- karma-cli@2.0.0 +-- tsc@2.0.4 +-- typescript@5.2.2 +-- webpack-cli@5.1.4 `-- webpack@5.89.0

MDENet-Education-Platform@ C:\Users\Will\git\yamtl\educationplatform -- mdenet-educationplatform@0.0.1 -> .\platform +-- ace-builds@1.14.0 +-- copyfiles@2.4.1 +-- handlebars@4.7.7 +-- jasmine@4.5.0 +-- jquery@3.6.0 +-- jszip@3.10.1 +-- karma-chrome-launcher@3.1.1 +-- karma-jasmine-html-reporter@2.0.0 +-- karma-jasmine@5.1.0 +-- karma-junit-reporter@2.0.1 +-- karma-webpack@5.0.0 +-- karma@6.4.2 +-- metro4@4.5.1 +-- svg-pan-zoom@3.6.1 +-- webpack-cli@5.1.4 -- yaml@2.3.1

arturboronat commented 10 months ago

Thanks, Will. I have merged the rest of changes and the playground works well.

I'm still getting the metro4 issue both from windows10 and from WSL, locally. I still need to try from a separate virtual machine.

Let's leave the issue open for now. I need to look into this in more detail at some point.

arturboronat commented 9 months ago

This has been fixed now with the much appreciated help of a JS developer.

There was a version incompatibility and the dependency metro4 had been imported both in the parent folder node_modules and in the platform folder node_modules with different versions.

This issue can be closed.

barnettwilliam commented 9 months ago

Thank you for the update on this Artur