我希望能够为不同的路径发送相同的文件,比如/stuff和/stuff/foo,问题是当我尝试这样做时,我会得到以下错误:
Refused to execute script from 'http://localhost:8000/stuff/main.js' because its MIME type ('text/html') is not executable, and strict MIME type checking
“需要的根路径”)^
TypeError: Function.serveStatic 在对象处所需的根路径。(C:\Users\joe\Downloads\fine\nodejs.js:40:40) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565
我的react组件有一个故事书,当我试图在根路径(即:https://some-domain.com/)中托管故事书的静态构建时,这个故事书工作得很好。但是,当尝试在诸如https://some-domain.com/subpath之类的子路径上驻留时,我从控制台得到下面的错误。_10201200909073022.js:308)
at __webpack_require__ (runtime~main.ba0ee86f12448108b672.bundl