小编Igo*_*vic的帖子

npm run build with Parcel 抛出错误

安装节点,运行 npm init 创建 package.json,安装 Parcel。使用 npx Parcel index.html 运行服务器来运行服务器。然后我将package.json中的“scripts”更改为“start”:“parcel index.html”,并运行npm run start,它也运行服务器没有问题。然后我添加到“scripts”“build”:“parcel build index.html”并运行 npm run build。但这不起作用...\n我收到以下错误...

\n
> vjezba-17@1.0.0 build  \n> parcel build index.html\n\n\xc3\x97 Build failed.\n\n@parcel/namer-default: Target "main" declares an output file path of "index.js" which does not match the compiled bundle type "html".\n\n  C:\\Users\\ijevr\\Desktop\\JavaScript\\vjezba 17\\package.json:4:11\n    3 |   "version": "1.0.0",\n  > 4 |   "main": "index.js",\n  >   |           ^^^^^^^^^^ Did you mean "index.html"?\n    5 |   "scripts": {\n    6 |     "start": "parcel index.html",\n\n  \xe2\x84\xb9 Try changing the file extension of …
Run Code Online (Sandbox Code Playgroud)

json npm

5
推荐指数
1
解决办法
3629
查看次数

媒体查询字体大小不起作用

我搜索过,但没有发现任何类似于我的问题.

#navigation {
  position: fixed;
  top: 0;
  width: 100%;
  color: #ffffff;
  height: 35px;
  text-align: center;
  padding-top: 15px;
  -webkit-box-shadow: 0px 0px 8px 0px #000000;
  -moz-box-shadow: 0px 0px 8px 0px #000000;
  box-shadow: 0px 0px 8px 0px #000000;
  background: url(../images/bg.jpg) repeat top left;
  z-index: 9999;
}
#navigation a {
  font-size: 15px;
  padding-left: 15px;
  padding-right: 15px;
  color: #F2B704;
  text-decoration: none;
}
#navigation a:hover {
  color: #D78E02;
}
@media only screen and (max-device-width: 480px) {
  #navigation a {
    font-size: 10px;
  }
}
Run Code Online (Sandbox Code Playgroud)
<div id="navigation">
  <a …
Run Code Online (Sandbox Code Playgroud)

html css media html5 css3

3
推荐指数
2
解决办法
6874
查看次数

标签 统计

css ×1

css3 ×1

html ×1

html5 ×1

json ×1

media ×1

npm ×1