拷贝 NPM文件 dist/npm/axios/lib/adapters/xhr.js
{ Error: ENOENT: no such file or directory, open 'http'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at recursiveRequire (/Users/sma2lbaolee/sma2lbao/taro/io.sma2lbao.sooin/node_modules/_@tarojs_cli@1.0.1@@tarojs/cli/src/util/resolve_npm_files.js:134:24)
at resolveNpmFilesPath (/Users/sma2lbaolee/sma2lbao/taro/io.sma2lbao.sooin/node_modules/_@tarojs_cli@1.0.1@@tarojs/cli/src/util/resolve_npm_files.js:61:5)
at CallExpression (/Users/sma2lbaolee/sma2lbao/taro/io.sma2lbao.sooin/node_modules/_@tarojs_cli@1.0.1@@tarojs/cli/src/util/resolve_npm_files.js:103:33)
at NodePath._call (/Users/sma2lbaolee/sma2lbao/taro/io.sma2lbao.sooin/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/Users/sma2lbaolee/sma2lbao/taro/io.sma2lbao.sooin/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/Users/sma2lbaolee/sma2lbao/taro/io.sma2lbao.sooin/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/Users/sma2lbaolee/sma2lbao/taro/io.sma2lbao.sooin/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/context.js:150:16)
at TraversalContext.visitSingle (/Users/sma2lbaolee/sma2lbao/taro/io.sma2lbao.sooin/node_modules/_babel-traverse@6.26.0@babel-traverse/lib/context.js:108:19) errno: -2, code: 'ENOENT', syscall: 'open', path: 'http' }
期望行为
正常发送请求
报错信息
Uncaught (in promise) TypeError: adapter is not a function
at dispatchRequest (dispatchRequest.js:48)
at
问题描述 使用axios报错
复现步骤 [复现问题的步骤]
[或者可以直接贴源代码,能贴文字就不要截图]
期望行为 正常发送请求
报错信息
Uncaught (in promise) TypeError: adapter is not a function at dispatchRequest (dispatchRequest.js:48) at
系统信息
补充信息 [可选] [根据你的调查研究,出现这个问题的原因可能在哪里?]