Node.js 在react&x2B;nodejs,为什么文件上传使用requirecontex fetch停止工作,现在给出;无法获取<;文件名>&引用;?
以下是过去工作和停止工作的代码:Node.js 在react&x2B;nodejs,为什么文件上传使用requirecontex fetch停止工作,现在给出;无法获取<;文件名>&引用;?,node.js,reactjs,fetch,Node.js,Reactjs,Fetch,以下是过去工作和停止工作的代码: // THIS LINE WORKS, RETURNS LIST OF FILE NAMES let arDataFileList = require.context ('./../public/', true, /\.data$/ ).keys() // THIS STILL DOES LOOP THROUGH THE LIST OF FILE NAMES arDataFileList.map(fetched_fileName => { fetch
// THIS LINE WORKS, RETURNS LIST OF FILE NAMES
let arDataFileList = require.context ('./../public/', true, /\.data$/ ).keys()
// THIS STILL DOES LOOP THROUGH THE LIST OF FILE NAMES
arDataFileList.map(fetched_fileName => {
fetch(fetched_fileName)
.then ((fetched_file) => fetched_file.text() // BUT THIS GIVES "Cannot GET <filename>"
handleSearchStringUpdate _snippetData[i]= 8 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /Sentinel_UA.xlsm.data</pre>
</body>
</html>
Error occured while trying to proxy to: localhost:3000/Product_Api_Gateway.xlsm.data