Can't Import NodeMaterials R169; Error: Cannot read properties of null (reading 'assign')

I have two very basic Node projects. Project A imports and call a simple function from project B. and renders it with WebGPURenderer.

//Project B
import * as THREE from 'three/tsl';

export const createPlane = () => {
    const mesh = new THREE.Mesh(new THREE.PlaneGeometry(),new THREE.MeshBasicNodeMaterial())
    mesh.frustumCulled =false 
    return mesh
}
//------------

//Project A
import * as foo from '@B/core'
...
scene.add(foo.createPlane())

But calling my function from project A cause this error:

While this works, I don’t intend to write my library this way:

//Project B
import * as THREE from 'three/tsl';

export const createPlane = ({material}) => {
    const mesh = new THREE.Mesh(new THREE.PlaneGeometry(),material)
    mesh.frustumCulled =false 
    return mesh
}

//------------

//Project A
import * as THREE from 'three/tsl';
import * as foo from '@B/core'
...
scene.add(foo.createPlane({material:new THREE.MeshBasicNodeMaterial()}))

Not really sure where your setup might be causing this error but here is something that works.

Just place the BCore.js file where you think it should go and change the path to it inside the BCore.html file. Also note that I have used semicolons (;) in the code.

BCore.zip (1.3 KB)