SAP-samples / ui5-webcomponents-sample-vue

UI5 Web Components Sample TODO application built with Vue.
https://sap-samples.github.io/ui5-webcomponents-sample-vue/
Apache License 2.0
59 stars 22 forks source link

This dependency was not found error #44

Closed jcailan closed 2 years ago

jcailan commented 3 years ago

Hi,

I followed the getting started section, did the command:

> npm install

and

> npm run serve

then I get this console error

jhodel: ui5-webcomponents-sample-vue git@master > npm run serve

> ui5-webcomponents-sample-vue@0.7.0 serve /Users/jhodel/Downloads/ui5-webcomponents-sample-vue
> vue-cli-service serve

 INFO  Starting development server...
40% building 208/242 modules 34 active /Users/jhodel/Downloads/ui5-webcomponents-sample-vue/node_modules/@ui5/webcomponents/node_modules/@ui5/webcomponents-base/dist/types/CalendarType.jsBrowserslist: caniuse-lite is outdated. Please run next command `npm update`
98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 errors                                                                                                                                              16:32:51

This dependency was not found:

* @ui5/webcomponents-base/dist/features/browsersupport/Edge in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&

To install it, you can run: npm install --save @ui5/webcomponents-base/dist/features/browsersupport/Edge

I tried following the suggestion and execute the install command but eventually get another error:

jhodel: ui5-webcomponents-sample-vue git@master > npm install --save @ui5/webcomponents-base/dist/features/browsersupport/Edge
npm ERR! code ENOLOCAL
npm ERR! Could not install from "@ui5/webcomponents-base/dist/features/browsersupport/Edge" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jhodel/.npm/_logs/2021-03-27T08_39_46_725Z-debug.log

Can please help to identify what's wrong?

Cachetian commented 2 years ago

Hi,

I followed the getting started section, did the command:

> npm install

and

> npm run serve

then I get this console error

jhodel: ui5-webcomponents-sample-vue git@master > npm run serve

> ui5-webcomponents-sample-vue@0.7.0 serve /Users/jhodel/Downloads/ui5-webcomponents-sample-vue
> vue-cli-service serve

 INFO  Starting development server...
40% building 208/242 modules 34 active /Users/jhodel/Downloads/ui5-webcomponents-sample-vue/node_modules/@ui5/webcomponents/node_modules/@ui5/webcomponents-base/dist/types/CalendarType.jsBrowserslist: caniuse-lite is outdated. Please run next command `npm update`
98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 errors                                                                                                                                              16:32:51

This dependency was not found:

* @ui5/webcomponents-base/dist/features/browsersupport/Edge in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&

To install it, you can run: npm install --save @ui5/webcomponents-base/dist/features/browsersupport/Edge

I tried following the suggestion and execute the install command but eventually get another error:

jhodel: ui5-webcomponents-sample-vue git@master > npm install --save @ui5/webcomponents-base/dist/features/browsersupport/Edge
npm ERR! code ENOLOCAL
npm ERR! Could not install from "@ui5/webcomponents-base/dist/features/browsersupport/Edge" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jhodel/.npm/_logs/2021-03-27T08_39_46_725Z-debug.log

Can please help to identify what's wrong?

I face exact the same issue here, (so happy to see someone else face the exact same issue with me), and I fixed the issue by comment out line 58 of App.vue // import "@ui5/webcomponents-base/dist/features/browsersupport/Edge";. this file indeed does not exist in node_nodules.

besides, I faced more issues, as below.

i319998@C02XL3B1JGH5 ui5-webcomponents-sample-vue2 % npm run serve
Debugger attached.

> ui5-webcomponents-sample-vue@0.7.0 serve /Users/i319998/Documents/GitHub/Github_Open_Sky/ct-study-ui-vue/ui5-webcomponents-sample-vue2
> vue-cli-service serve

Debugger attached.
 INFO  Starting development server...
98% after emitting CopyPlugin

 ERROR  Failed to compile with 4 errors                                                                                                                                    11:33:40 PM

These dependencies were not found:

* core-js/modules/es6.object.keys in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&
* core-js/modules/es6.regexp.to-string in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&
* core-js/modules/es7.object.get-own-property-descriptors in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&
* core-js/modules/web.dom.iterable in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&

To install them, you can run: npm install --save core-js/modules/es6.object.keys core-js/modules/es6.regexp.to-string core-js/modules/es7.object.get-own-property-descriptors core-js/modules/web.dom.iterable

After research, I find the way to fix it, npm install core-js@2, said it's caused by core-js version (default 3) not compatible with with vue 2 cli. mine working version "core-js": "^2.6.12", in package.json dependencies.

fifoosid commented 2 years ago

Hi guys,

thanks for the analyses and the proposed solution for this issue!

We are planning on updating the Vue & Vue CLI versions to the latest soon, so this should fix the issue for all users.