Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependencies #104

Closed
OctaneInteractive opened this issue Aug 7, 2019 · 9 comments
Closed

Missing dependencies #104

OctaneInteractive opened this issue Aug 7, 2019 · 9 comments

Comments

@OctaneInteractive
Copy link

Hi!

Having followed the instructions down to step 2, I'm getting the following errors on the command line:

These dependencies were not found:

  • @babel/runtime-corejs2/core-js/json/stringify in ../node_modules/vue-froala-wysiwyg/es/vue-froala.js
  • @babel/runtime-corejs2/core-js/object/define-property in ../node_modules/vue-froala-wysiwyg/es/index.js, ../node_modules/vue-froala-wysiwyg/es/vue-froala.js
  • @babel/runtime-corejs2/helpers/interopRequireDefault in ../node_modules/vue-froala-wysiwyg/es/index.js, ../node_modules/vue-froala-wysiwyg/es/vue-froala.js

To install them, you can run: npm install --save @babel/runtime-corejs2/core-js/json/stringify @babel/runtime-corejs2/core-js/object/define-property @babel/runtime-corejs2/helpers/interopRequireDefault

... and these errors in the browser:

[HMR] bundle has 5 errors
../node_modules/vue-froala-wysiwyg/es/vue-froala.jsModule not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/json/stringify' in '/path_to_project/node_modules/vue-froala-wysiwyg/es'../node_modules/vue-froala-wysiwyg/es/index.jsModule not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/object/define-property' in '/path_to_project/node_modules/vue-froala-wysiwyg/es'../node_modules/vue-froala-wysiwyg/es/vue-froala.jsModule not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/object/define-property' in '/path_to_project/node_modules/vue-froala-wysiwyg/es'../node_modules/vue-froala-wysiwyg/es/index.jsModule not found: Error: Can't resolve '@babel/runtime-corejs2/helpers/interopRequireDefault' in '/path_to_project/node_modules/vue-froala-wysiwyg/es'../node_modules/vue-froala-wysiwyg/es/vue-froala.jsModule not found: Error: Can't resolve '@babel/runtime-corejs2/helpers/interopRequireDefault' in '/path_to_project/node_modules/vue-froala-wysiwyg/es'

I'm reluctant to go messing around with Babel, and less inclined to do so when there's no mention of having to do this.

Some guidance would be much appreciated.

@afwn90cj93201nixr2e1re
Copy link

afwn90cj93201nixr2e1re commented Aug 10, 2019

To install them, you can run: npm install --save @babel/runtime-corejs2/core-js/json/stringify @babel/runtime-corejs2/core-js/object/define-property @babel/runtime-corejs2/helpers/interopRequireDefault

did you tried?
If you are using cli, like vue clie or something like that, you should have this.
https://github.com/froala/vue-froala-wysiwyg/blob/master/package.json#L47

So, on other way's you can just include script into html.

@afwn90cj93201nixr2e1re
Copy link

Just open dir node_modules\vue-froala-wysiwyg\es it's using when you using import, so, you must use node_modules\vue-froala-wysiwyg\dist which already compiled.

@OctaneInteractive
Copy link
Author

Hi @afwn90cj93201nixr2e1re, as I explained, I'd prefer not to install plugins for Babel when the installation instructions make no mention of this — if I break Babel, I risk breaking the entire application.

@OctaneInteractive
Copy link
Author

I tried and got another error:

npm ERR! code ENOLOCAL
npm ERR! Could not install from "@babel/runtime-corejs2/core-js/json/stringify" as it does not contain a package.json file.

I don't have a good understanding of Babel.

@afwn90cj93201nixr2e1re
Copy link

Show how you importing files.
@OctaneInteractive

@OctaneInteractive
Copy link
Author

OctaneInteractive commented Aug 12, 2019

As per the instructions, but the last error is from running:

npm install --save @babel/runtime-corejs2/core-js/json/stringify @babel/runtime-corejs2/core-js/object/define-property @babel/runtime-corejs2/helpers/interopRequireDefault

... and not how I've added the code.

@afwn90cj93201nixr2e1re
Copy link

afwn90cj93201nixr2e1re commented Aug 12, 2019

#104 (comment)

import VueFroala from 'vue-froala-wysiwyg/dist/vue-froala.min.js'
try this

@OctaneInteractive
Copy link
Author

Working.

So is this something wrong with the installation, or the actual package itself?

@afwn90cj93201nixr2e1re
Copy link

Here's nothing wrong.
If you're using es6 imports its gonna take sources, so, now u r using dist, which already compiled.

#104 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants