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

Cannot find module 'xslt4node' #4

Closed
navaddins opened this issue Dec 18, 2017 · 4 comments
Closed

Cannot find module 'xslt4node' #4

navaddins opened this issue Dec 18, 2017 · 4 comments

Comments

@navaddins
Copy link

navaddins commented Dec 18, 2017

Hi,

I got below error message when i run "odata2openapi -drp Northwind.xml cmd after successful install.

i'll appreciate your support

I use NodeJs 8.9.1 and npm 5.5.1 on windows 10.

module.js:538
throw err;

Error: Cannot find module 'xslt4node'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (C:\nodejs\node_modules\npm\node_modules\tools\transform.js:13:17)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)

Regards,

@ralfhandl
Copy link
Contributor

Hi,

I tested it with NodeJS 6.11.5 and npm 5.5.1 on Windows 10 Enterprise 1607.

Regards
Ralf

@ralfhandl
Copy link
Contributor

@navaddins I installed NodeJS v8.9.3 and npm 5.6.0, installed the latest node-gyp globally, uninstalled xslt4node globally and installed xslt4node again globally. Then I ran odata2openapi -drp Northwind.xml and it produced the expected result.

Could you please try again with NodeJS 8.9.3, and cross-check that you

Thanks in advance
Ralf

@navaddins
Copy link
Author

Dear Ralf,

Sorry for late reply and thanks you so much for your reply. I was away from my PC. Problem was solved but I don't know exactly what is the root cause. I deleted the node_modules under odata_master\tools. Api file is generated again after i use same command.

Here is result and command

PS C:\nodejs\odata-openapi-master\tools> npm install

java@0.9.0 install C:\nodejs\odata-openapi-master\tools\node_modules\java
node-gyp rebuild

C:\nodejs\odata-openapi-master\tools\node_modules\java>if not defined npm_config_node_gyp (node "C:\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
java.cpp
javaObject.cpp
javaScope.cpp
methodCallBaton.cpp
nodeJavaBridge.cpp
utils.cpp
win_delay_load_hook.cc
Creating library C:\nodejs\odata-openapi-master\tools\node_modules\java\build\Release\nodejavabridge_bindings.lib
and object C:\nodejs\odata-openapi-master\tools\node_modules\java\build\Release\nodejavabridge_bindings.exp
Generating code
Finished generating code
nodejavabridge_bindings.vcxproj -> C:\nodejs\odata-openapi-master\tools\node_modules\java\build\Release\nodejavabrid
ge_bindings.node
nodejavabridge_bindings.vcxproj -> C:\nodejs\odata-openapi-master\tools\node_modules\java\build\Release\nodejavabridg
e_bindings.pdb (Full PDB)

java@0.9.0 postinstall C:\nodejs\odata-openapi-master\tools\node_modules\java
node postInstall.js

npm WARN odata-openapi@0.0.0 license should be a valid SPDX license expression

added 21 packages in 30.391s

I have another question regarding "npm WARN odata-openapi@0.0.0 license should be a valid SPDX license expression". May i know why warning message is come out and is it any issue if use odata2openapi?

Regards,

@ralfhandl
Copy link
Contributor

Dear @navaddins,

Glad to hear that it now works.

The warning is caused by package.json referencing the LICENSE.md file in this repository, which in turn references the RF on RAND license mode used by the OASIS OData Technical Committee. Please have a look at this license and judge for yourself whether it will work for you.

Kind regards
Ralf

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