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

Fixed npm install fails with Conflicting peer dependency: [email protected] #263

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,6 @@ Thumbs.db

.cache

docs
docs

.package-lock.json
3 changes: 2 additions & 1 deletion lib/react-wrapper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use strict";
const {Base64} = require('js-base64');

Object.defineProperty(exports, "__esModule", {
value: true
Expand Down Expand Up @@ -99,7 +100,7 @@ function (_React$Component) {
var src = Babel.transform(wrapper, {
presets: ['react', 'es2015']
}).code;
script.src = 'data:text/plain;base64,' + btoa(src);
script.src = 'data:text/plain;base64,' + Base64.encode(src);
} catch (error) {
console.log(error);
}
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"license": "MIT",
"dependencies": {
"brace": "^0.11.1",
"js-base64": "^3.7.7",
"react-ace": "^9.5.0",
"react-docgen": "^5.4.0",
"react-frame-component": "^5.2.1",
Expand All @@ -24,8 +25,8 @@
"vue2-ace-editor": "^0.0.15"
},
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^17.0.2 || ^18.3.1",
"react-dom": "^17.0.2 || ^18.3.1"
Comment on lines +28 to +29
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe in updating this; we need to change something more than that.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DwCleb Okay I'm currently working on this one. I will tag you once i was complete with the changes that i'm working on.

},
"devDependencies": {
"@babel/cli": "^7.16.8",
Expand Down
4 changes: 2 additions & 2 deletions src/react-wrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react'
import brace from 'brace'
import AceEditor from 'react-ace'
import Frame, { FrameContextConsumer } from 'react-frame-component'

import { Base64 } from 'js-base64';
import 'brace/mode/jsx'
import 'brace/theme/monokai'
import ComponentRenderer from './component-renderer'
Expand Down Expand Up @@ -48,7 +48,7 @@ class Wrapper extends React.Component {
})()`
try {
const src = Babel.transform(wrapper, { presets: ['react', 'es2015'] }).code
script.src = 'data:text/plain;base64,' + btoa(src)
script.src = 'data:text/plain;base64,' + Base64.encode(src)
} catch (error) {
console.log(error)
}
Expand Down
Loading