cmswalker / fullpage-react

Stateful fullpage.js inspired scrolling for React
https://cmswalker.github.io/fullpage-react/
206 stars 42 forks source link

Installation queries #96

Closed athulmurali closed 6 years ago

athulmurali commented 6 years ago

Hello cmswalker,

I am trying to build a website with full-page-react and having trouble with importing.

Also, I need some clarifications on how it is intended to be used.

The steps that I followed to install (as described in the installation notes )are

1.  create-react-app   react-portfolio

2.  npm install fullpage-react --save

3. import { Fullpage, HorizontalSlider, Slide } from 'fullpage-react'

(didnt work as IDE was unable to trace the above given modules)

Hence, I used the following

import { Fullpage, HorizontalSlider, Slide } from 'fullpage-react/lib/index';

  1. npm start
Failed to compile
./node_modules/fullpage-react/lib/components/Fullpage.js
Module parse failed: Unexpected token (21:29)
You may need an appropriate loader to handle this file type.
|   const style = {};
|   return {
|     querySelectorAll: () => [<div></div>],
|     documentElement: {
|       style

Am I using it in the right way?

Can you please provide some points on how to get it right?

My repo : https://github.com/athulmurali/portfolio/tree/master/src

athulmurali commented 6 years ago

Cloned and copy pasted my content into a forked version. Works like charm. Great job. Please close this issue. My bad

cmswalker commented 6 years ago

Very strange. It should be referencing the built version which is resolved from package.json as FullpageReact.js does that not resolve for you?

cmswalker commented 6 years ago

Also just to make sure, after running create-react-app you did cd into your new project directory before installing this module right?