marklogic-community / slush-marklogic-node

Slush generator for a MarkLogic/node project
https://github.com/marklogic-community/slush-marklogic-node/wiki
Other
40 stars 28 forks source link

Windows - slush marklogic-node <app-name> "generator issue" #274

Closed rwjlewis closed 8 years ago

rwjlewis commented 8 years ago

Due to the diffence in Windows commands for navigating directories. The install will fail, for example the error log contains this issue: These errors are returned – it is an automated process so there shouldn’t be a file missing, unless the there is a step not defined in the above directions to "cd" into the directory which would require a break-point in the script.

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'install' ] 2 info using npm@1.4.28 3 info using node@v0.10.36 4 verbose node symlink C:\Program Files\nodejs\node.exe 5 error install Couldn't read dependencies 6 error package.json ENOENT, open 'C:\Users\rlewis\Downloads\package.json' 6 error package.json This is most likely not a problem with npm itself. 6 error package.json npm can't find a package.json file in your current directory. 7 error System Windows_NT 6.1.7601 8 error command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" 9 error cwd C:\Users\rlewis\Downloads 10 error node -v v0.10.36 11 error npm -v 1.4.28 12 error path C:\Users\rlewis\Downloads\package.json 13 error code ENOPACKAGEJSON 14 error errno 34 15 verbose exit [ 34, true ]

The below process isolates where in the steps, the issue arises: Run the generator Go to the directory where your new project will be created (the parent). Then: slush marklogic-node This will ask you several questions, with some intelligent defaults. Configure your application Go to the generated application directory: cd {app-name}

Note the slush command is what generates the below error without any break-point to cd into the {app-name}

bluetorch commented 8 years ago

Please provide the following information: Windows version nodejs version ruby version python version Are you using cmd.exe or another shell? Did you install slush-marklogic-node from the npm repository or the latest from github?

Thanks!

rwjlewis commented 8 years ago

Windows 7(6.1 Build 7601: Service Pack 1) node.js 0.10.36 ruby 2.2.3 python 3.5

cmd (as administrator and as normal) I installed both versions with no positive results

bluetorch commented 8 years ago

This process works with a fresh install of Windows 7 sp1 with the following potential differences from your environment:

  1. slush, gulp, bower, slush-marklogic-node were all installed in an Administrator command prompt
  2. slush marklogic-node was executed in a normal command prompt
  3. the following node-gyp (https://github.com/nodejs/node-gyp) dependencies were installed: .NET framework 4.0 was installed (https://www.microsoft.com/en-us/download/details.aspx?id=17851) Windows 7 SDK was installed (https://www.microsoft.com/en-us/download/details.aspx?id=8279) Python 2.7 was installed (Python 3 is not supported by node-gyp)
  4. Git was set to checkout line endings as-is, commit as-is
grtjn commented 8 years ago

Did the suggestions from @bluetorch help? Can we close this ticket?

grtjn commented 8 years ago

Any votes for closing this?

rwjlewis commented 8 years ago

Nothing has changed regarding the bugs as far as I know, so why move to close ?

grtjn commented 8 years ago

No news sounded like good news. Did the suggestions of bluetorch help you?

rwjlewis commented 8 years ago

We qualified bugs, but the bugs haven't been fixed via code updates.

bluetorch commented 8 years ago

The primary problem with @rwjlewis install is that he is using node 0.10.x with an old npm version (1.x). The reason for using node 0.10.x is for compatibility with MarkLogic Node Client API. The documentation for the Node Client API requires the latest version of npm. Unfortunately npm in this scenario is unable to update itself, so extra manual steps are required and are now outlined in the WINDOWS.mdown document.

grtjn commented 8 years ago

@rwjlewis Satisfied with this resolution?

grtjn commented 8 years ago

Didn't receive a reply so far, closing the ticket for now, so we can proceed with releasing 1.0.2.

Please reopen the ticket if anyone feels it wasn't solved satisfactory..