<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 21 juil. 2019 à 20:48, <<a href="mailto:sgk@riseup.net">sgk@riseup.net</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Package: nodejs<br>
Version: 10.15.2~dfsg-2<br>
Severity: grave<br>
<br>
After creating a fresh chroot 'sid' environment <br>
and installing nodejs and npm <br>
`npm install` is throwing the below error:<br>
internal/modules/cjs/loader.js:583<br>
throw err;<br>
^<br>
<br>
Error: Cannot find module 'semver'<br>
at Function.Module._resolveFilename<br>
(internal/modules/cjs/loader.js:581:15)<br>
at Function.Module._load (internal/modules/cjs/loader.js:507:25)<br>
at Module.require (internal/modules/cjs/loader.js:637:17)<br>
at require (internal/modules/cjs/helpers.js:22:18)<br>
at Object.<anonymous> (/usr/share/npm/lib/utils/unsupported.js:2:14)<br>
at Module._compile (internal/modules/cjs/loader.js:689:30)<br>
at Object.Module._extensions..js<br>
(internal/modules/cjs/loader.js:700:10)<br>
at Module.load (internal/modules/cjs/loader.js:599:32)<br>
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)<br>
at Function.Module._load (internal/modules/cjs/loader.js:530:3)<br>
------------------------------------------------------------<br>
even installed modules are not working while trying to run the below<br>
cmd.<br>
$ ls /usr/share/nodejs/<br>
mixin-deep normalize-path y18n<br>
$ node -e "require('y18n');"<br>
internal/modules/cjs/loader.js:583<br>
throw err;<br>
^<br>
<br>
Error: Cannot find module 'y18n'<br>
at Function.Module._resolveFilename<br>
(internal/modules/cjs/loader.js:581:15)<br>
at Function.Module._load (internal/modules/cjs/loader.js:507:25)<br>
at Module.require (internal/modules/cjs/loader.js:637:17)<br>
at require (internal/modules/cjs/helpers.js:22:18)<br>
at [eval]:1:1<br>
at Script.runInThisContext (vm.js:96:20)<br>
at Object.runInThisContext (vm.js:303:38)<br>
at Object.<anonymous> ([eval]-wrapper:6:22)<br>
at Module._compile (internal/modules/cjs/loader.js:689:30)<br>
at evalScript (internal/bootstrap/node.js:587:27)<br></blockquote><div><br></div><div>I cannot say what's wrong from the information you gave.</div><div>Here with same node version</div>$ node -p "require.resolve('y18n')"<br>/usr/share/nodejs/y18n/index.js</div><div class="gmail_quote"><br></div><div class="gmail_quote">can you check that last file path exists ?</div><div class="gmail_quote"><br></div><div class="gmail_quote">Then can you compare with your output of:</div><div class="gmail_quote">node -p process.execPath</div><div class="gmail_quote">/usr/bin/node<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">node -p "require.resolve.paths('y18n')"<br>[ '/home/dev/node_modules',<br> '/home/node_modules',<br> '/node_modules',<br> '/home/dev/.node_modules',<br> '/home/dev/.node_libraries',<br> '/usr/lib/x86_64-linux-gnu/nodejs',<br> '/usr/share/nodejs',<br> '/usr/lib/nodejs' ]<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Also maybe of interest</div><div class="gmail_quote">node -p process.env.NODE_PATH<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Thanks,<br><div>Jérémy</div></div></div>