Javascript 启动Meteor应用程序时出错+;react(静态html)
我有一个运行Meteor framework+React的应用程序。我正在尝试使用Javascript 启动Meteor应用程序时出错+;react(静态html),javascript,html,reactjs,npm,meteor,Javascript,Html,Reactjs,Npm,Meteor,我有一个运行Meteor framework+React的应用程序。我正在尝试使用npmstart命令启动应用程序,但我不断收到关于静态html文件的错误。我是meteor的新手,所以我尝试运行以下命令: meteor remove static-html meteor add blaze-html-templates 但我还是犯了同样的错误 => Errors prevented startup: While processing files
npmstart
命令启动应用程序,但我不断收到关于静态html文件的错误。我是meteor的新手,所以我尝试运行以下命令:
meteor remove static-html
meteor add blaze-html-templates
但我还是犯了同样的错误
=> Errors prevented startup:
While processing files with static-html (for target web.browser):
deploy/bundle/programs/web.browser/body.html:1: Expected one of: <body>, <head>, <template>
deploy/bundle/programs/web.browser/head.html:1: Expected one of: <body>, <head>, <template>
deploy/bundle/programs/web.browser.legacy/body.html:1: Expected one of: <body>, <head>, <template>
deploy/bundle/programs/web.browser.legacy/head.html:1: Expected one of: <body>, <head>, <template>
While processing files with static-html (for target web.browser.legacy):
deploy/bundle/programs/web.browser/body.html:1: Expected one of: <body>, <head>, <template>
deploy/bundle/programs/web.browser/head.html:1: Expected one of: <body>, <head>, <template>
deploy/bundle/programs/web.browser.legacy/body.html:1: Expected one of: <body>, <head>, <template>
deploy/bundle/programs/web.browser.legacy/head.html:1: Expected one of: <body>, <head>, <template>
=> Your application has errors. Waiting for file change.
=>阻止启动的错误:
使用静态html处理文件时(对于目标web.browser):
deploy/bundle/programs/web.browser/body.html:1:应为以下之一:,
deploy/bundle/programs/web.browser/head.html:1:应为以下之一:,
deploy/bundle/programs/web.browser.legacy/body.html:1:应为以下之一:,
deploy/bundle/programs/web.browser.legacy/head.html:1:应为以下之一:,
使用静态html处理文件时(对于目标web.browser.legacy):
deploy/bundle/programs/web.browser/body.html:1:应为以下之一:,
deploy/bundle/programs/web.browser/head.html:1:应为以下之一:,
deploy/bundle/programs/web.browser.legacy/body.html:1:应为以下之一:,
deploy/bundle/programs/web.browser.legacy/head.html:1:应为以下之一:,
=>您的应用程序有错误。正在等待文件更改。
我非常感谢您提供呈现react组件所需的
react
和react dom
帮助
meteor npm install --save react react-dom
您需要删除blaze
addstatic html
back<代码>静态html用于呈现init html元素,然后react
可以从那里接管
meteor remove blaze-html-templates
meteor add static-html
React流星指南
我运行了上面的脚本,但仍然出现相同的错误。。。无更改您应重新启动meteor命令,并确保在正确的文件夹中运行该命令