Problem with npm install

Hello, I am using rclone 1.64 and I am trying to execute npm install into a mounted folder. The source folder is a NFS mounted directory. My mount command is:

rclone mount --cache-dir /opt/cachefs/cache/b7b4b8a8c68843e0b24c59fcc1dd5614/WorkCopy --file-perms 0777 --dir-perms 0777 --vfs-write-back 10 --attr-timeout 1 --allow-other --transfers 10 --vfs-cache-mode full -vv --links /opt/fsx/Integration/WorkCopy/b7b4b8a8c68843e0b24c59fcc1dd5614 /opt/cachefs/data/b7b4b8a8c68843e0b24c59fcc1dd5614/WorkCopy

I am trying top execute

npm install cronapp-lib-js@2.9.6-SP.8

and I am getting

npm ERR! code EIO
npm ERR! syscall symlink
npm ERR! path ../terser/bin/terser
npm ERR! dest /opt/techne/cronoside/cachefs/data/b7b4b8a8c68843e0b24c59fcc1dd5614/WorkCopy/src/main/webapp/node_modules/.bin/terser
npm ERR! errno -5
npm ERR! EIO: i/o error, symlink '../terser/bin/terser' -> '/opt/techne/cronoside/cachefs/data/b7b4b8a8c68843e0b24c59fcc1dd5614/WorkCopy/src/main/webapp/node_modules/.bin/terser'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-09-21T18_10_39_619Z-debug-0.log

The -vv log tail is:

2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/core/icons/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/: Remove: name="doc"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris: Added virtual directory entry vDel: "doc"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/core/icons/: Remove: name="tiny_mce"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/core/icons: Added virtual directory entry vDel: "tiny_mce"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/core/icons/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/core/: Remove: name="icons"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/core: Added virtual directory entry vDel: "icons"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/core/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/: Remove: name="core"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris: Added virtual directory entry vDel: "core"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/tiny_mce_wiris/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/: Remove: name="tiny_mce_wiris"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins: Added virtual directory entry vDel: "tiny_mce_wiris"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/plugins/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/: Remove: name="plugins"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce: Added virtual directory entry vDel: "plugins"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/tinymce/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/: Remove: name="tinymce"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins: Added virtual directory entry vDel: "tinymce"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/plugins/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/: Remove: name="plugins"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce: Added virtual directory entry vDel: "plugins"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/tinymce/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/: Remove: name="tinymce"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js: Added virtual directory entry vDel: "tinymce"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/js/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/: Remove: name="js"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist: Added virtual directory entry vDel: "js"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/dist/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/: Remove: name="dist"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js: Added virtual directory entry vDel: "dist"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/cronapp-lib-js/: >Remove: err=<nil>
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/: Remove: name="cronapp-lib-js"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules: Added virtual directory entry vDel: "cronapp-lib-js"
2023/09/21 18:17:36 DEBUG : src/main/webapp/node_modules/: >Remove: err=<nil>

What is the purpose of this mount?

You have NFS mounted directory:

/opt/fsx/Integration/WorkCopy/b7b4b8a8c68843e0b24c59fcc1dd5614

and you mount it using rclone to another local directory(?):

/opt/cachefs/data/b7b4b8a8c68843e0b24c59fcc1dd5614/WorkCopy

with cache in another local directory:

--cache-dir /opt/cachefs/cache/b7b4b8a8c68843e0b24c59fcc1dd5614/WorkCopy

The source directory in NFS is a very slow directory. I want when reading, copy to local disk and when writing, write to local disk and send to remove async

I think in order to proceed you have to find out what the issue is exactly. Based on your npm error it looks like there is some issue with symlinks.

Try mount without --links

Try manually creating symlinks in your mount etc.

I am afraid that npm installation debugging is beyond this forum scope so you have to identify rclone related issue first.

On the second thought IMO it is impossible to make it work as mount does not support symlinks and your npm program needs them.

I have tried with —links and —copy-links and no look. I will try create a symlink manually and send here

You can but I am pretty much sure it won't work. I have tried on my machine using only local directories and it does not work.

You better spend time on trying to improve speed of your NFS mount.

It was clever and creative idea you had about utilising rclone as NFS speed booster but unfortunately links are not supported.

True. However there is a PR that I'd like to merge which does implement this!

1 Like

Can you send the link of PR ?

I believe this is the one:

If you are familiar with git and building from source you could give it a try for your use case.

I will try and give you a feedback

Hello,

The symlink error seems to be resolved, but now I am having errors with remove:

$ npm install cronapp-lib-js@2.9.6-SP.8
npm WARN webapp@1.0.0 No description
npm WARN webapp@1.0.0 No repository field.

npm ERR! code EIO
npm ERR! syscall rmdir
npm ERR! path /home/project/src/main/webapp/node_modules/.staging/@uirouter
npm ERR! errno -5
npm ERR! EIO: i/o error, rmdir '/home/project/src/main/webapp/node_modules/.staging/@uirouter'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/.npm/_logs/2023-09-25T14_26_36_561Z-debug.log
$ rm -rf node_modules/*
rm: cannot remove 'node_modules/@cronapp/framework-core': Input/output error
rm: cannot remove 'node_modules/chart.js/node_modules/moment/src/locale': Input/output error
rm: cannot remove 'node_modules/chart.js/test/fixtures/core.scale': Input/output error
rm: cannot remove 'node_modules/chart.js/test/fixtures/plugin.filler': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/SourceSansPro': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/WorkSans': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/arial-narrow': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/calibri': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/georgia': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/glyphicons-halflings': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/helvetica-neue': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/inter': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/lato': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/material-icons': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/news-cycle': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/open-sans': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/raleway': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/rawline': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/roboto': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/times-new-roman': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/fonts/ubuntu': Input/output error
rm: cannot remove 'node_modules/cronapp-framework-js/css/privacy': Input/output error
...

I think you should share your findings with this PR author.

Actually I see he is here - @pasnox something for you.

The same error occurs on npm repositories without symlinks and using rclone 1.64. @pasnox can help ?

The error you shared doesn't mean much as there's no rclone debug log.

Pretty please re-create the issue and share the full rclone debug log.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.