3
react-slick slider을 내 ReactJS 응용 프로그램에 통합하려고합니다.TypeError : 정의되지 않은 'userAgent'속성을 읽을 수 없습니다.
새 데모 응용 프로그램에 통합 할 때 예상대로 작동하지만 내 응용 프로그램에 통합하면 오류가 발생합니다. 레일을 백엔드로 사용하고 있습니다.
가 나는 오류 나를 보여줍니다
var Slider = require('react-slick');
같은 구성 요소에서 슬라이더를 가져 오려고합니다. (레일)
오류 로그
| ExecJS::ProgramError - TypeError: Cannot read property 'userAgent' of undefined:| execjs (2.7.0)
lib/execjs/ruby_racer_runtime.rb:98:in `wrap_error'| execjs (2.7.0)
lib/execjs/ruby_racer_runtime.rb:15:in `rescue in block in initialize'| execjs (2.7.0)
lib/execjs/ruby_racer_runtime.rb:12:in `block in initialize' | execjs (2.7.0)
lib/execjs/ruby_racer_runtime.rb:75:in `block in lock'| execjs (2.7.0)
lib/execjs/ruby_racer_runtime.rb:73:in `lock'| execjs (2.7.0)
lib/execjs/ruby_racer_runtime.rb:9:in `initialize'| execjs (2.7.0)
편집이다
일부 다른 어디 내 코드에서 내가 코드를 아래에 작성하고 그것을 잘
'use strict';
var React = require('react');
import logo from 'img/spark-logo.jpg'
var Carousel = require('nuka-carousel');
//import { NukaDecorate } from 'nuka-carousel-autoscroll';
class App1 extends React.Component{
// mixins: [Carousel.ControllerMixin],
render() {
return (
<Carousel>
<img src={logo} alt="Smiley face" />
<img src="http://placehold.it/1000x400/ffffff/c0392b/&text=slide2"/>
<img src="http://placehold.it/1000x400/ffffff/c0392b/&text=slide3"/>
</Carousel>
)
}
}
module.exports = App1;
@Tushar가 편집을 – Anish
를 참조하십시오 [문서는] (https://github.com/sstephenson/execjs#faq), ExecJS 지원하지 않는'') (필요 . –
일부 기본 템플릿에서 js 코드를 '