Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > JavaScript: Общие вопросы > Не работает strings.includes и пр


Автор: magnuz 8.7.2019, 09:39
Туториал https://www.youtube.com/watch?v=NQ2i...i8o-_c-9Vva_W0 где чувак црм делает на вуе и огнебазе. Прошел половину. Вроде все нормэ, но то и дело наталкиваюсь на непонятные ерроры при компиляции

Сроки кода типа
Код

console.log("1234 5678".includes("1234"))


или
Код

Object.keys(_r).length


выводит :

Код
Код


 WAIT  Compiling...                                                                                                                           21:36:20
 98% after emitting CopyPlugin

 ERROR  Failed to compile with 2 errors                                                                                                       21:36:22
These dependencies were not found:

* core-js/modules/es6.string.includes in ./src/main.js
* core-js/modules/es7.array.includes in ./src/main.js

To install them, you can run: npm install --save core-js/modules/es6.string.includes core-js/modules/es7.array.includes


Попытка последовать совету выдает :

Код


npm install --save core-js/modules/es6.string.includes core-js/modules/es7.array.includes
npm ERR! code ENOLOCAL
npm ERR! Could not install from "core-js\modules\es6.string.includes" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-07-07T18_46_12_187Z-debug.log

что это? Бабизм бабеля? как с этим бороться?


package.json : 
Код


{
  "name": "vuecrm",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build"
  },
  "dependencies": {
    "core-js": "^3.1.4",
    "es6": "^0.0.7",
    "firebase": "^6.2.4",
    "materialize-css": "^1.0.0-rc.2",
    "register-service-worker": "^1.6.2",
    "vue": "^2.6.10",
    "vue-router": "^3.0.3",
    "vuex": "^3.0.1"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.8.0",
    "@vue/cli-plugin-pwa": "^3.8.0",
    "@vue/cli-service": "^3.8.0",
    "node-sass": "^4.9.0",
    "sass-loader": "^7.1.0",
    "vue-template-compiler": "^2.6.10",
    "vuelidate": "^0.7.4"
  }

}

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)