解决 实现,以便您可以异步和同步地代表文件的require.resolve() 例 异步解析: var resolve = require ( 'resolve' ) ; resolve ( 'tap' , { basedir : __dirname } , function ( err , res ) { if ( err ) console . error ( err ) ; else console . log ( res ) ; } ) ; $ node example/async.js /home/substack/projects/node-resolve/no