If you create a new camera object like this, the position of the camera defaults to WGS84:
camera: {
heading: 90,
tilt: 45,
position: [ -122, 38, 20000 ]
}
This is most likely incompatible with the spatial reference of your building scene layer, which is why scene view throws an error. Granted, the error message could provide a bit more information.
You can create a valid camera object like this:
camera: {
position: {
x: -122, /* replace with projected coordinate */
y: 38, /* replace with projected coordinate */
z: 20000,
spatialReference: { wkid: 28992 /* Replace with wkid of your scene layer */ }
},
heading: 90,
tilt: 45
}
Also, instead of adding your building scene layer as a basemap, better add it as a layer to your map. This will make sure widgets like the layer list and legend work properly out-of-the-box:
const bSceneLayer = new BuildingSceneLayer({
url: my_url,
});
var map = new Map({
layers: [bSceneLayer],
});
Hope this helps! Otherwise as Rene already pointed out, it would be good to have a running sample app you can share.