简体   繁体   中英

cannot find a module express

waseem@waseem-HP-Laptop-14q-cs0xxx:~/nodedbtest$ npm install express npm ERR! Unexpected end of JSON input while parsing near '...ugin-import":"2.18.2"'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/waseem/.npm/_logs/2020-01-28T07_47_56_274Z-debug.log
waseem@waseem-HP-Laptop-14q-cs0xxx:~/nodedbtest$ npm install express@4.17.1
npm ERR! Unexpected end of JSON input while parsing near '...ugin-import":"2.18.2"'

npm ERR! A complete log of this run can be found in: npm ERR! /home/waseem/.npm/_logs/2020-01-28T07_48_26_728Z-debug.log

Try to clean the cache before installing the module in this case.

npm cache clean --force

Then,

npm i express

This should work

This will help you:

npm cache clean --force
npm install express@latest

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM