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

Get a warning without CodeMirror #32

Closed
lqez opened this issue Jun 26, 2019 · 4 comments · Fixed by #33
Closed

Get a warning without CodeMirror #32

lqez opened this issue Jun 26, 2019 · 4 comments · Fixed by #33
Assignees

Comments

@lqez
Copy link

lqez commented Jun 26, 2019

Describe the bug
ColorPicker can be used without CodeMirror, but it still has a dependency on CodeMirror.

To Reproduce
Steps to reproduce the behavior:

  1. Use it as ES6 style.
  2. Run webpack.
  3. Error occurs.

Expected behavior
Can be used without CodeMirror installation

Additional context
Webpack warning message:

WARNING in ./node_modules/codemirror-colorpicker/dist/codemirror-colorpicker.js
Module not found: Error: Can't resolve 'codemirror' in '/Users/lqez/Dev/veryslide/veryslide/node_modules/codemirror-colorpicker/dist'
 @ ./node_modules/codemirror-colorpicker/dist/codemirror-colorpicker.js
@easylogic easylogic self-assigned this Jun 27, 2019
easylogic added a commit that referenced this issue Jun 27, 2019
easylogic added a commit that referenced this issue Jun 27, 2019
fixed #32, support peerDependency codemirror
@lqez
Copy link
Author

lqez commented Jun 27, 2019

Thanks, @easylogic !

@easylogic
Copy link
Collaborator

@lqez

please test it to v1.9.51

@lqez
Copy link
Author

lqez commented Jun 27, 2019

Installing 1.9.51:

$ npm install codemirror-colorpicker
npm WARN codemirror-colorpicker@1.9.51 requires a peer of codemirror@^5.48.0 but none is installed. You must install peer dependencies yourself.

+ codemirror-colorpicker@1.9.51

After installing 1.9.51:

$ npm list --depth 0
veryslide@0.1.0 /Users/lqez/Dev/veryslide/veryslide
...
├── UNMET PEER DEPENDENCY codemirror@^5.48.0
├── codemirror-colorpicker@1.9.51
...
npm ERR! peer dep missing: codemirror@^5.48.0, required by codemirror-colorpicker@1.9.51

Webpack result

$ npm run start
...
WARNING in ./node_modules/codemirror-colorpicker/dist/codemirror-colorpicker.js
Module not found: Error: Can't resolve 'codemirror' in '/Users/lqez/Dev/veryslide/veryslide/node_modules/codemirror-colorpicker/dist'
 @ ./node_modules/codemirror-colorpicker/dist/codemirror-colorpicker.js
 @ ./src/components/Editor.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost (webpack)/hot/dev-server.js ./src/index.js
...

Summary: still in problem

@lqez
Copy link
Author

lqez commented Jun 27, 2019

This package can be ran without CodeMirror, so the policy for setting CodeMirror as a peer dependency is not necessary here.

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

Successfully merging a pull request may close this issue.

2 participants