ember.js Ember-CLI v0.0.44项目未生成,并显示“在严格模式下使用常量,”错误消息

wribegjk  于 2022-11-05  发布在  其他
关注(0)|答案(1)|浏览(150)

我需要更新一个模板在一个相当过时的ember项目(其约5岁),但我无法建立它。

以下是工作环境:

Nodejs     v0.10.46 (via NVM)
NPM        v2.15.1
Ember-CLI  v0.0.44
Ember      1.8.1
Bower

以下是package.json文件的内容:

{
  "name": "xxxxx",
  "version": "0.0.0",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "test"
  },
  "scripts": {
    "start": "ember server",
    "build": "ember build",
    "test": "ember test"
  },
  "repository": "https://github.com/stefanpenner/ember-cli",
  "engines": {
    "node": ">= 0.10.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "body-parser": "^1.2.0",
    "broccoli-asset-rev": "0.0.17",
    "broccoli-ember-hbs-template-compiler": "^1.6.1",
    "connect-restreamer": "^1.0.0",
    "ember-cli": "0.0.44",
    "ember-cli-ember-data": "0.1.0",
    "ember-cli-ic-ajax": "0.1.1",
    "ember-cli-inject-live-reload": "^1.0.2",
    "ember-cli-qunit": "0.1.0",
    "express": "^4.8.5",
    "glob": "^4.0.5"
  }
}

以下是bower.json文件的内容:

{
  "name": "eam-ui",
  "dependencies": {
    "handlebars": "~1.3.0",
    "ember": "1.8.1",
    "jquery": "^1.11.0",
    "ember-resolver": "~0.1.7",
    "loader": "stefanpenner/loader.js#1.0.1",
    "ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",
    "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
    "ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
    "ember-qunit": "0.1.8",
    "ember-qunit-notifications": "0.0.4",
    "qunit": "~1.15.0",
    "foundation": "~5.4.7",
    "ember-i18n": "~2.2.1",
    "cldr": "~1.0.2",
    "es5-shim": "~4.0.1",
    "e164-phones-countries": "~1.0.3",
    "FileSaver.js": "koffsyrup/FileSaver.js"
  },
  "resolutions": {
    "jquery": "^1.11.0"
  }
}

建置应用程序会产生下列输出:

ember build
version: 0.0.44

/Users/xxxxxx/Documents/proj1050/xxxxx/node_modules/ember-cli-inject-live-reload/index.js:3
const buildLiveReloadPath = require('clean-base-url');
^^^^^
Use of const in strict mode.
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Function.Addon.lookup (/Users/xxxxxx/Documents/proj1050/xxxxx/node_modules/ember-cli/lib/models/addon.js:270:19)

我知道这个项目是超级过时的。有什么想法,我可以做些什么来解决这个建设问题?或者我应该开始计划我的逃跑?
提前感谢!

frebpwbc

frebpwbc1#

是的,这是旧的。:)
您可以通过将package.json中的一行从以下内容更改为以下内容来解决此特定问题:

"ember-cli-inject-live-reload": "^1.0.2",

"ember-cli-inject-live-reload": "1.0.3",

祝你好运

相关问题