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

Vizceral Transpile Breaks on Lodash #33

Closed
JSONRice opened this issue Oct 17, 2016 · 5 comments
Closed

Vizceral Transpile Breaks on Lodash #33

JSONRice opened this issue Oct 17, 2016 · 5 comments

Comments

@JSONRice
Copy link
Contributor

JSONRice commented Oct 17, 2016

With the latest 3.0.6 I run the following:

npm install && npm run build

And am receiving this error:

ERROR in vizceral.min.js from UglifyJS
SnytaxError: Unexpected token: name (_) [./src/vizceral.js:18,0]
@jrsquared
Copy link
Contributor

Did you run npm install fresh or is this in an existing vizceral directory? If it's a directory that has already been used, make sure you run npm update as well.

Keep in mind that this module is used regularly at each published version so transpiling does work in general. If something is not working specifically for you, please try to include a lot more detail (node version, npm version, OS, make sure you're testing from a clean clone and install...)

@JSONRice
Copy link
Contributor Author

Just ran:

npm install vizceral@3.0.6 && cd node_modules/vizceral && npm install && npm run build

The node_modules were deleted prior. I even ran an npm update and repeated the install and build stages and am receiving the same aforementioned error.

@jrsquared
Copy link
Contributor

Ah, you're trying to run scripts from inside the node_modules directory. That's a workflow I have never run across. The match to run babel was a regex on node_modules, so it was never being transpiled.

@jrsquared
Copy link
Contributor

Nevermind, just realized that this fixes the one error seen when trying to transpile inside the node_modules directory, but it breaks the output. Reverted this change. We don't support running npm run build inside of a node_modules directory. Use git clone to get the source and build if you need to build it, and npm link if you want to use your own modified vizceral.

@JSONRice
Copy link
Contributor Author

@jrsquared thank you. I was running:

npm install vizceral
cd node_modules
cd vizceral
npm install && npm run build

Hopefully others won't make the same mistake. I put a BUILD.md inside my own custom vizceral build with this note. Essentially what I'm doing is putting the transpiled source into a lib/vizceral and that's all being distributed by Gulp and served up as a single main.min.js file to my Angular UI.

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