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
Support creating ajv bundle in Windows #206
Comments
Can't reproduce, although I tried with npm 3.9.3 (I used nvm to install, that's the latest it has), yours is 3.9.5 |
Ah, just noticed, you have windows... |
Also, did you just 'npm install'ed or 'git clone'd and then installed? |
Yes. I'm trying it on windows. I tried two ways. First downloaded the zip and copied in into file system and then tried npm install. Then also tried to git cloned and then install, however the issue was same. |
It all works on mac... Can you at least install ajv as a dependency? The only existing circular dependency, if that's what it is, is that ajv depends on gh-pages-generator that depends on ajv. gh-pages-generator is a dev dependency (although it makes no difference on mac, it works ok if it's a normal dependency as well)... Can you maybe try removing it from package.json and run npm install without it? |
@sushant160185 Can you provide us with a |
@ralphtheninja Ah, sorry, got it :) |
As I understood, @sushant160185 did just the following:
So ajv is not a dependency, it was installed separately. @sushant160185 is it correct? |
Works well on linux as well. I suspect something is fishy here ;) |
@epoberezkin Yes, all I did was create a clone of ajv (using git desktop), "cd ajv" and "npm install ajv" and I got this error. I haven't changed or added anything in the ajv repository. I'm trying it on windows 7 os. @ralphtheninja package.json is part of the ajv repository. No changes done in that. I'm new to this npm environment so if you can give me some steps on how should I do it on windows environment then it will be helpful for me. Thanks. |
Did you try removing gh-pages-generator from package.json before npm install? |
Yes, I did. Seems it still gave same exception. Attached is the log. |
You shouldn't need to do anything special. Unfortunately I don't have access to a windows machine at home :/ I can try tomorrow. |
@sushant160185 Can I ask what are you trying to do in general? To make some change in ajv? |
No, not to change anything in ajv. I wanted to try this in a simple browser based app. So at first I tried creating bundle from ajv package, however, "npm run build" script failed. I then tried to do installation first and then check the build process, however, that also failed. In the meantime, I picked up the file from cdnjs site for my app so as such I'm not stuck but was just hoping that I should be able to install and/or create the bundle independently. |
Bundle is included in npm package. If you make ajv a dependency in your app ( I still need to figure out what is wrong with npm install inside ajv in windows. |
It's not a bug, it's caused by the command you've tried to run. You don't want to do |
Thanks @blakeembrey. This copied the ajv and other dependencies inside my project app with some warnings. |
The bundle shipped with ajv can be used as is - this is recommended. If you really want to re-build you need:
|
@epoberezkin Thanks. I ran these commands. Everything ran fine except npm run bundle, which gave error
|
Most likely because https://github.com/epoberezkin/ajv/blob/master/package.json#L21 isn't a Windows executable. I think if you change |
@blakeembrey I made the changes however it still failed with following error.
|
@sushant160185 You have to fix lines 9-12 in bundle script in the same way. |
I did that as well. The error this time was:
|
in 4.11.5 |
Hi,
While install ajv throug npm I'm getting error. Attached is the error log "npm-debug.txt"
npm-debug.txt
I was also not able to create separate UMD bundle for browser using npm run bundle script. Attached in the error log "npm-run-bundle-debug.txt" Is it required that I install ajv before creating the bundle?
npm-run-bundle-debug.txt
Let me know what could be the problem here.
Thanks.
The text was updated successfully, but these errors were encountered: