When I try to build my VueJS typescript app I get the following dependency errors.
vue-cli-service serve
INFO Starting development server... Starting type checking and linting service... Using 1 worker with 2048MB memory limit 98% after emitting CopyPlugin
ERROR Failed to compile with 5 errors 9:05:52 PM These dependencies were not found:
To install them, you can run: npm install --save core-js/modules/es6.function.name core-js/modules/es6.string.includes core-js/modules/es6.typed.uint8-array core-js/modules/es7.array.includes core-js/modules/web.dom.iterable No type errors found No lint errors found Version: typescript 3.5.2, tslint 5.17.0
Then when I run the suggested npm command at the end of the error list I get the following error.
npm install --save core-js/modules/es6.function.name core-js/modules/es6.string.includes core-js/modules/es6.typed.uint8-array core-js/modules/es7.array.includes core-js/modules/web.dom.iterable npm ERR! code ENOLOCAL npm ERR! Could not install from "core-js\modules\es6.function.name" as it does not contain a package.json file.
To solve the error "'vue-cli-service' is not recognized as an internal or external command, operable program or batch file", install the @vue/cli-service package globally by running npm install -g @vue/cli-service and clear your npm cache.
The vue-cli-service serve command starts a dev server (based on webpack-dev-server) that comes with Hot-Module-Replacement (HMR) working out of the box. In addition to the command line flags, you can also configure the dev server using the devServer field in vue. config. js .
The CLI Service ( @vue/cli-service ) is a development dependency. It's an npm package installed locally into every project created by @vue/cli . The CLI Service is built on top of webpack and webpack-dev-server.
vue-cli-service lintLints and fixes files. If no specific files are given, it lints all files in src and tests , as well as all JavaScript files in the root directory (these are most often config files such as babel. config. js or . eslintrc.
npm add core-js
did the trick for me :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With