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

Something went all wrong while downloading the schema files! #10

Closed
michal-majer opened this issue Nov 24, 2017 · 7 comments · Fixed by #11
Closed

Something went all wrong while downloading the schema files! #10

michal-majer opened this issue Nov 24, 2017 · 7 comments · Fixed by #11

Comments

@michal-majer
Copy link

Hi,

I have the error during installation of ui5-schemas.
I also tried to perform the installation with parameter -v 1.44.24 but error is still the same.

Could You help? :)

ui5-schemas error

@cschuff
Copy link
Member

cschuff commented Nov 25, 2017

Hey,

what does

echo %APPDATA%
ui5-schemas --debug

say?

BR
Chris

@mmachauerjs
Copy link

Same Error here.

Output for echo %APPDATA%:
C:\Users\Mmachaue\AppData\Roaming

And Output for ui5-schemas --debug:
capture

BR
Marc

@xtreemrage
Copy link
Contributor

xtreemrage commented Dec 20, 2017

Getting the same error, running in cmd, with the following statement: npx ui5-schemas

Error: C:\project\C:\Users\<username>\AppData\Roaming\UI5Experts\ui5-schemas contains invalid WIN32 path characters.

Why is it concatenating the path like that?

Trying this out with:

node -v = v9.3.0
npm -v = 5.5.1
windows 7 pro

When running the command with the debug flag: npx ui5-schemas --debug

npx: installed 1 in 2.449s
The "path" argument must be of type string
C:\project\npm-config\npm\node_modules\ui5-schemas\bin\index.js
ui5-schemas info Preparing 'sapui5' schemas in version 'latest'...
ui5-schemas debug [download] Downloading all libraries metafile from 'https://sa
pui5.hana.ondemand.com/discovery/all_libs'
ui5-schemas error Damn... Something went all wrong while downloading the schema
files!
ui5-schemas error Are you sure the version '' is still available on 'sapui5' dow
nload pages?
ui5-schemas error { Error: C:\Users\<username>\AppData\Roaming\C:\Users\<username>\App
Data\Roaming\UI5Experts\ui5-schemas contains invalid WIN32 path characters.
    at Object.mkdirsSync (C:\project\npm-config\npm\node_modules\ui5-schemas\node_m
odules\fs-extra\lib\mkdirs\mkdirs-sync.js:18:22)
    at Object.emptyDirSync (C:\project\npm-config\npm\node_modules\ui5-schemas\node
_modules\fs-extra\lib\empty\index.js:34:18)
    at Object.schemas (C:\project\npm-config\npm\node_modules\ui5-schemas\lib\downl
oad.js:46:6)
    at download.allLibsFile.then (C:\project\npm-config\npm\node_modules\ui5-schema
s\bin\index.js:62:18)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7) code: 'EINVAL
' }

@xtreemrage
Copy link
Contributor

xtreemrage commented Dec 20, 2017

@cschuff
I have found the issues for us, windows (7 pro/10 pro) users, in the lib\download.js file line 46:

fs.emptyDirSync(path.join(process.cwd(), options.outputDir, options.version));

When I remove process.cwd(), it works.

fs.emptyDirSync(path.join(options.outputDir, options.version));

Why is that needed (something *nix OS needed)?
Also I think it's better to fix the version in the package.json file, I had some situation where sem ver was not really followed. What do you think?

npm run test is fine, I can create a pull request if you want with the javascript fix and create a different issue/pull request to assure the versions are fixed (without prefix, ~ or ^) in the package.json file?

And we need to create some real test in the near future ;).

@michal-majer and @mmachauerjs
What kind of windows versions do you have? Windows 10 (pro)?

@cschuff
Copy link
Member

cschuff commented Dec 21, 2017

@xtreemrage Thanks for the investigation work. I will fix this as soon as possible. If you want to speed up things feel free to open a pull request.

@xtreemrage What is the problem with the semver version resp. package.json? I don't want to have fixed dependencies in there. That's what the package-lock.json is for (in npm5). Or did I miss something here?

I'm in the middle of a bigger refactoring towards a 1.0 anyways that will surely contain tests. But I don't have a release date yet :)

@xtreemrage
Copy link
Contributor

xtreemrage commented Dec 21, 2017

@cschuff
I will try to create a pull request today, if time let's me.

@cschuff
Well there was a bug in from 5.1.0 till ~5.6.0 (not sure where it is solved) that modified the package-lock.json (with npm 5.5.1 it still changes).

Nice, I'm looking forward to v1.0. If you need some help, regarding reviews or some, let me know.

@cschuff
Copy link
Member

cschuff commented Feb 2, 2018

Hey folks,

finally published 0.3.1 including @xtreemrage bugfix. Thanks again.

HF
Chris

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

Successfully merging a pull request may close this issue.

4 participants