Open justinlevi opened 7 years ago
Hey,
I don't really understand this problem, is it still problem ? if yes can you give more informations ?
Thanks
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: https://github.com/wavesjs/waves-ui/issues/25
If the develop branch is fixed then this can probably be closed out. I'll try and test this morning and report back.
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: https://github.com/wavesjs/waves-ui/issues/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.
Yes it looks like this is the problem, I will try to make a release soon to prevent this problem.
The Master branch seems to be throwing an error that I'm unable to track down exactly.
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.