Linked Questions

Popular Questions

I have to create a Svelte project on an offline RHEL 8.6 system. On that system, I have only a "dedicated" filesystem used as packages repo (RHEL, ....) with Nginx as interface.

I've downloaded all the Node.js .tgz packages that I need and copied them inside this repo (following the path given by then npm view ${package} dist.tarball command.

When I want to create a new project, I use this command : npm create svelte@latest test_project --registry http://myrepo.../nodejs The package 'create-svelte' is found as expected in my offline repo but the creation process ends with the following error :

FetchError : invalid json response body at http://myrepo.../nodejs/create-svelte/ reason: Unexpected token < in JSON at posistion 0
  at Response.json (/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/body.js:79:13)

If a perform a similar test for installing a package, I've the same behaviour. For example : npm install --save-dev @smui/button --registry http://myrepo.../nodejs Leeds to the same error : FETCH_ERROR ... invalid response body

Is there a way to manage offline packages just inside a filesystem ?

I saw that, a way to answer my issue is to copy 'node_modules' from an online station to my offline station. But it's not the kind of solution I'm looking for, I need te create several projects and have all my packages managed in a single spot (for configuration management).


Related Questions