bundle.js cannot be found
bundle.js cannot be found
我正在使用react/router 2.0的browserHistory和lite-server构建一个应用程序。Router代码如下
const appRouter = (
<Router history={browserHistory}>
<Route path="/" component={App}>
<IndexRoute component={LandingPage}/>
<Route path="/posts" component={Posts}/>
<Route path="/posts/:postId" component={Post}/>
</Route>
</Router>
);
错误是X GET http://localhost:3000/posts/lib/bundle.js
此错误仅在url为http://localhost:3000/posts/somePostId并且刷新页面或
后发生。lib/bundle.js文件应该从根目录'/'加载,但它试图从'/posts/'加载。
我刚从hashHistory切换到browserHistory,切换后发生错误
因为你有一条路由<Route path="/posts/:postId" component={Post}/>
,
与bundle.js: http://localhost:3000/posts/lib/bundle.js
的路径相匹配,请尝试将js文件移到其他文件夹或使用其他路径
相关文章:
- Requirejs main.js could not be found
- JavaScript文件在IIS上返回404 Not Found
- 可以对不属于't writive be shadowed
- react-css-module module not found
- Yii:TbCollapse 多链接(href = #collapse 并将状态更新为 be=“1”)
- express.JS .push cousing array to be undefined
- aurelia-bundler gulp.js can't be found
- grails3 jquery not found
- GeckoFX JSContext not found C#
- 我必须在 JS 中创建这种格式的数据.{ x: 1, y: 1, name: 'BE'},.
- Javascript:一个项目数组的sum-all-found.data()
- "未定义不是函数“;在.to Be功能
- Marionette: childViewContainer was not found
- .found('.foo').text()作为数组
- window.found(文本)用于Flash部分
- Js not found spring mvc
- Ajax POST MyUrl 404 (Not Found)
- 节点webkit中的Require('jquery ui')产生navigator not found错
- xmlhttp.send() returns 404 Not Found (Ajax)
- bundle.js cannot be found