当我尝试使用“npx 包裹文件名”进行预览时,它不起作用

问题描述

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <Meta charset="UTF-8">
    <title>Document</title>
    <style>
        *{margin:0;padding:0} 
        canvas{display: block}
        #container{width: 100vw;height: 100vh}
    </style>
</head>
<body>
    <div id="container"></div>
    <script src="js/app.js"></script>
</body>
</html>

app.js

alert('hello')

当我尝试使用 npx parcel index.html
进行预览时 本地主机页面与我的设计不同..
在本地主机页面上没有显示警报模式..

enter image description here

我该如何解决??...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)