admin管理员组文章数量:1291010
Why does parcel start
throw a no entries found error? I looked online and found that parcel can't find the index.html, but I don't understand why. I have a index.html file in the root folder. Is there anything I'm missing?
package.json
{
"name": "meep.io",
"version": "1.0.0",
"description": "",
"main": "index.html",
"dependencies": {
"pixi.js": "^5.2.0",
"typescript": "^3.7.2"
},
"devDependencies": {
"parcel-bundler": "^1.12.4"
},
"scripts": {
"start": "parcel index.html",
"watch": "parcel watch index.html"
},
"keywords": [],
"author": "",
"license": "ISC"
}
Index.html
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title></title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="" />
<style>
body {
margin: 0px;
padding: 0px;
overflow: hidden;
}
canvas {
display: block;
background: grey;
}
</style>
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">
You are using an <strong>outdated</strong> browser. Please
<a href="#">upgrade your browser</a> to improve your experience.
</p>
<![endif]-->
<canvas id="game-canvas"></canvas>
<script src="./src/app.ts"></script>
</body>
</html>
Why does parcel start
throw a no entries found error? I looked online and found that parcel can't find the index.html, but I don't understand why. I have a index.html file in the root folder. Is there anything I'm missing?
package.json
{
"name": "meep.io",
"version": "1.0.0",
"description": "",
"main": "index.html",
"dependencies": {
"pixi.js": "^5.2.0",
"typescript": "^3.7.2"
},
"devDependencies": {
"parcel-bundler": "^1.12.4"
},
"scripts": {
"start": "parcel index.html",
"watch": "parcel watch index.html"
},
"keywords": [],
"author": "",
"license": "ISC"
}
Index.html
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title></title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="" />
<style>
body {
margin: 0px;
padding: 0px;
overflow: hidden;
}
canvas {
display: block;
background: grey;
}
</style>
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">
You are using an <strong>outdated</strong> browser. Please
<a href="#">upgrade your browser</a> to improve your experience.
</p>
<![endif]-->
<canvas id="game-canvas"></canvas>
<script src="./src/app.ts"></script>
</body>
</html>
Share
Improve this question
edited Nov 25, 2019 at 22:25
anonymous-dev
asked Nov 25, 2019 at 21:44
anonymous-devanonymous-dev
3,52912 gold badges65 silver badges138 bronze badges
1
- See also How to fix 'no entries found' on server run in Parcel.js – ggorlen Commented Mar 2, 2023 at 1:14
2 Answers
Reset to default 6In my case put source via package.json makes things work.
{
..
"source": "index.html",
..
}
Official docs with more params
I was using parcel start
instead of npm run start
本文标签: javascriptParcelNo entries foundStack Overflow
版权声明:本文标题:javascript - Parcel - No entries found - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741524186a2383368.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论