Node Material Works in the editor but fails in my project

I created a material that takes a heightmap to apply displacement to a mesh and creates a normal map at runtime from the same heightmap. The material works perfectly on the Node Editor however, when added to my project it doesn’t even load throwing the following error.

Uncaught (in promise) TypeError: Cannot set property 'isExposedOnFrame' of undefined
at nodeMaterialBlock.js:665
at Array.forEach (<anonymous>)
at VectorMergerBlock.NodeMaterialBlock._deserializePortDisplayNamesAndExposedOnFrame (nodeMaterialBlock.js:660)
at VectorMergerBlock.NodeMaterialBlock._deserialize (nodeMaterialBlock.js:653)
at NodeMaterial.loadFromSerialization (nodeMaterial.js:1428)
at nodeMaterial.js:1263

You can check the material here. https://nme.babylonjs.com/#JTZ2FV#6

Here is my inport code,


you can see that i comented the texture duplicates there because i was testing it out. What can I do here.?

If you are using 4.2, try with 5.0, there may have been some incompatibilities between the current NME and 4.2.

Is there a way to change the version used in the NME or do I have to update my project?

It’s not possible to change the version used by the NME, it’s always the latest one, so you will need to update your project.

When I tried to build my project with the update the following error appeared

export ‘Engine’ (imported as ‘BABYLON’) was not found in ‘@babylonjs/core’ (module has no exports)

You’re gonna have to share your setup or maybe link to your repo so we can see what is going on