Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run dev编译不成功,也不报错 #562

Closed
MechaGirls opened this issue May 29, 2018 · 9 comments
Closed

npm run dev编译不成功,也不报错 #562

MechaGirls opened this issue May 29, 2018 · 9 comments
Labels
wontfix This will not be worked on

Comments

@MechaGirls
Copy link

[问题简单描述]

在vue文件中不加入<style></style>和<script></script>会出现无法编译,一直在

$ node build/dev-server.js

也不出现报错提示

问题复现步骤:

  1. [第一步]
    在pages新建一个目录
    在目录里的vue文件中加入
<template>
  <div>
    首页
  </div>
</template>
  1. [第二步]
    运行npm run dev

期望的表现:
期望能正常编译,或者提示错误
[在这里描述期望的表现]

观察到的表现:
无法编译,一直停留在

$ node build/dev-server.js

也不报错
[在这里描述观察到的表现]
image

![复现步骤的屏幕截图和动态 GIF 图](图片的 url)

@MechaGirls MechaGirls changed the title npm run dev编译不成功,也不报错的问题所在 npm run dev编译不成功,也不报错 May 29, 2018
@F-loat
Copy link
Contributor

F-loat commented May 29, 2018

style 应该已经有默认值了,缺 script 确实会有这个问题,可以也加下默认值,但是为什么会没有写 script 呢。。

@zhuweiyou
Copy link

@F-loat 卧槽感谢,原来是没加 script,我说怎么编译没反应。因为有的页面是纯静态的,有可能没有 script 标签的,在 vue 中是允许这样写的。

@imEhllBdPGMVaArZ
Copy link

imEhllBdPGMVaArZ commented Jun 3, 2018

战略mark,今天给这玩意坑了几个钟😭,确实补充默认值即可

@kilohaty
Copy link

确实是缺少script标签的坑,尴尬了😂

@DevinWell1ee
Copy link

。。。真的坑

@songStar0904
Copy link

mark 终于找到缘由了 感谢题主

@kenberkeley
Copy link

same issue

@sunmydream
Copy link

好吧,看来不是我一个人有这个问题,真的是script的问题,补上就OK了

@mpvue-bot
Copy link

mpvue-bot bot commented Oct 23, 2018

issue超过30天无更新或响应,7天后将自动关闭,如果问题状态有更新请及时更新issue

@mpvue-bot mpvue-bot bot closed this as completed Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

9 participants