Skip to content

npm run build errors during SageMathCell server installation on Ubuntu #583

Description

@TSSFL

I'm experiencing build errors during the installation/build of SageMathCell on my Ubuntu VPS. After running ../sage/sage -sh -c make (and also ../sage/sage -sh -c make -B), the npm run build process fails with the following errors:

ERROR in ./js/interact_cell.js
Module not found: Error: Can't resolve 'base/js/events' in '/home/tssfl/sagecell/js'
@ ./js/session.js
@ ./js/cell.js
@ ./js/main.js

ERROR in ./js/session.js
Module not found: Error: Can't resolve 'base/js/events' in '/home/tssfl/sagecell/js'
@ ./js/cell.js
@ ./js/main.js

ERROR in ./js/session.js
Module not found: Error: Can't resolve 'base/js/namespace' in '/home/tssfl/sagecell/js'
@ ./js/cell.js
@ ./js/main.js

ERROR in ./js/session.js
Module not found: Error: Can't resolve 'services/kernels/kernel' in '/home/tssfl/sagecell/js'
@ ./js/cell.js
@ ./js/main.js

ERROR in ./js/utils.js
Module not found: Error: Can't resolve 'base/js/utils' in '/home/tssfl/sagecell/js'
@ ./js/cell.js
@ ./js/main.js

ERROR in ./js/widgets.js
Module not found: Error: Can't resolve 'mpl' in '/home/tssfl/sagecell/js'
@ ./js/session.js
@ ./js/cell.js
@ ./js/main.js

webpack 5.94.0 compiled with 6 errors in 42713 ms
make: *** [Makefile:42: static/embedded_sagecell.js] Error 1
These errors indicate that several required JavaScript modules are missing.

Steps to Reproduce:

Followed the SageMathCell build instructions for Ubuntu.
Executed ../sage/sage -sh -c make.
(Also tried ../sage/sage -sh -c make -B)
Observed the above build errors.

Expected Behavior:

Successful compilation of the SageMathCell server.

Actual Behavior:

Build process fails due to missing JavaScript modules.

Environment:

Ubuntu VPS 24.04
Node.js (version: 18.19.1)
npm (version: 9.2.0)
SageMath (version: 10.5)

Possible solutions attempted:

Deleted package-lock.json and executed npm install.

Additional context:

Previous ../sage/sage -sh -c make attempt resulted into the error:

cp static/jsmol/JSmol.min.nojq.js build/vendor/JSmol.js
cp: cannot stat 'static/jsmol/JSmol.min.nojq.js': No such file or directory
make: *** [Makefile:26: build] Error 1

Resolved it by creating /home/tssfl/sagecell/static/jsmol folder, downloding JSmol.min.nojq.js file - https://chemapps.stolaf.edu/jmol/jsmol/JSmol.min.nojq.js into static/jsmol and re-run ../sage/sage -sh -c make which resulted into the above errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions