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

TypeError: Cannot read property 'mark' of undefined #29

Open
justinlevi opened this issue Oct 23, 2017 · 4 comments
Open

TypeError: Cannot read property 'mark' of undefined #29

justinlevi opened this issue Oct 23, 2017 · 4 comments

Comments

@justinlevi
Copy link

The Master branch seems to be throwing an error that I'm unable to track down exactly.

screen shot 2017-10-22 at 8 33 21 pm

The good news is that I was able to fork the repository, merge develop into master, run the yarn run bundle command and get past the problem by including my fork as a dependency.

Here's the screen capture video of my process, adding the library to a fresh create-react-app project.

Note, create-react-app uses webpack and ES6 by default.

screenflow

@b-ma
Copy link
Contributor

b-ma commented Nov 13, 2017

Hey,

I don't really understand this problem, is it still problem ? if yes can you give more informations ?

Thanks

@justinlevi
Copy link
Author

Hmmm, I'm trying to remember what this issue was... I think it had something to do with trying to add the dependency with the command:

yarn add wavesjs/waves-ui

I don't think the dev branch was working for me due to the annotated-segment issue here:
#25

If the develop branch is fixed then this can probably be closed out. I'll try and test this morning and report back.

@justinlevi
Copy link
Author

Ok, the problem here stems from the fact that the develop branch does not include the build files required when importing the library using ES6.

import * as wavesUI from 'waves-ui';

The DEV branch is required due to all of the improvements and issues detailed here:
#25

So, as far as I can tell, including this project as a dependency, using npm or yarn, is currently broken. I was able to get around this issue by forking the repository and build the project myself, incorporating the changes in the develop branch.

The line in my package.json looks like this:

"waves-ui": "https://github.com/justinlevi/waves-ui.git"

My complete package.json:

{
  "name": "my project",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "bootstrap-sass": "^3.3.7",
    "node-sass-chokidar": "^0.0.3",
    "npm-run-all": "^4.1.1",
    "prop-types": "^15.6.0",
    "react": "^16.0.0",
    "react-bootstrap": "^0.31.3",
    "react-dom": "^16.0.0",
    "react-redux": "^5.0.6",
    "react-scripts": "1.0.14",
    "redux": "^3.7.2",
    "uuid": "^3.1.0",
    "waves-loaders": "wavesjs/waves-loaders",
    "waves-ui": "https://github.com/justinlevi/waves-ui.git"
  },
  "scripts": {
    "build-css": "node-sass-chokidar --include-path ./src/styles --include-path ./node_modules src/styles/ -o src/styles/",
    "watch-css": "npm run build-css && node-sass-chokidar --include-path ./src/styles --include-path ./node_modules src/styles/ -o src/styles --watch --recursive",
    "start-js": "react-scripts start",
    "start": "npm-run-all -p watch-css start-js",
    "build": "npm run build-css && react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

I don't think this will be an issue once you merge develop into master and rebuild.

@b-ma
Copy link
Contributor

b-ma commented Nov 14, 2017

Yes it looks like this is the problem, I will try to make a release soon to prevent this problem.

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