Upgrading jsreport to v2 errors out
-
Initially, globally installed cli was getting installed in users folder i.e.
C:\Users\..\AppData\Roaming\npm
. I changed the global location toC:\source\npm\
folder. In both cases, it's not working. This is the current location of globally installed cliC:\source\npm\jsreport C:\source\npm\jsreport.cmd
My project path is
C:\source\jsreportapp
-
hmm not sure what happens but it seems to me that the problem is related to having the global modules and the project app sharing the same root location or some permissions error that is not shown, the issue needs debugging with your same folders so i'm not sure we will be able to replicate the problem.
as a last resource, what is the output of
jsreport start --verbose
, share all the logs printed maybe there is some information there that can be helpful
-
Here is the output of
jsreport start --verbose
C:\>jsreport start --verbose "start" command not found in this installation, check that you are writing the command correctly or check if the command is available in your installation, use "jsreport -h" to see the list of available commands
-
What is your nodejs version? Try it out with the LTS one. https://nodejs.org
I mean try to uninstall everything and try again.
You still didn't posted the output ofjsreport init
. It could be interesting.
-
just downgraded to LTS version. Still seeing same issue,
jsreport start
and other cli commands are unavailable. Any how, i executedjsreport init
script. Here is the outputC:\source\jsreportapp>jsreport init --verbose jsreport installation not found, installing jsreport latest version now, wait a moment... jsreport installation finished.. Creating server.js Creating package.json Creating default config jsreport.config.json Initialized
Node and npm versions
C:\>node --version v8.12.0 C:\>npm --version 6.4.1
-
Hm. That looks good. Can you zip the jsreportapp an upload it somewhere?
-
shared my folder here.
https://drive.google.com/file/d/1YoADIxqEyn7PAUgVQeiLpeuftDSgjy-a/view?usp=sharing
-
Why do you have in that folder
jsreport.exe
?
-
i added
jsreport.exe
becausejsreport start
does not work with jsreport-cli (an issue stated above). When i usejsreport.exe start
, i am able to start the server
-
The structure of node_modules isn't flattened. This is not the way how the npm installs it by default.
This is the way how npm v2 installs modules. Haven't you done any configuration to the npm?I would recommend to delete
package-lock.json
,node_modules
andjsreport.exe
.Then type
npm install
. Thejsreport start
should work afterwards. If you have properly working npm.
-
Thank you for your help. I turned off npm
legacy-bundling
and it worked!!