atlas-bi / Library

🤔📈 Atlas | The unified report library.
https://atlas.bi
GNU General Public License v3.0
14 stars 5 forks source link

Install failure #357

Closed ImNtReal closed 1 year ago

ImNtReal commented 2 years ago

System Info

Issue

I've installed the dependencies, and cloned the repository. When I attempt to run npm install, it results in:

pm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\lib\cache.js:753:14)
npm ERR!     at C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\lib\cache.js:841:12
npm ERR!     at saved (C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\node_modules\npm-registry-client\lib\get.js:148:7)
npm ERR!     at C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\node_modules\graceful-fs\polyfills.js:133:7
npm ERR!     at FSReqCallback.oncomplete (node:fs:189:23)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Windows_NT 10.0.17763
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\ProgramData\\chocolatey\\lib\\npm\\tools\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\jmpugh_dladm\atlas-bi-library
npm ERR! node -v v19.0.0
npm ERR! npm -v 1.4.9
npm ERR! code E405
npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/github:christopherpickering/bulma-badge)
npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/github:atlas-bi/bulma-steps)
npm WARN `git config --get remote.origin.url` returned wrong result (git@github.com:github:christopherpickering/bulma-badge)
npm WARN `git config --get remote.origin.url` returned wrong result (git@github.com:github:atlas-bi/bulma-steps)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\jmpugh_dladm\atlas-bi-library\npm-debug.log
npm ERR! not ok code 0

How To Reproduce

  1. Install nodejs, dotnet-runtime, npm, vscode
  2. In VS Code, git clone https://github.com/atlas-bi/atlas-bi-library.git
  3. Create cust settings files
  4. Update DB connection strings
  5. Run npm install
christopherpickering commented 2 years ago

Thanks!

It seems as tho GitHub.com is blocked on your network when doing "automated" work. I've seen this in other institutions.

One way to bypass manually -

  1. comment out line 3 in the package.json
  2. run npm install
  3. manually download https://github.com/christopherpickering/bulma-badge into atlas/node_modules/@creativebulma/bulma-badge

image

From there you should be able to run npm db:update and npm start.

If this works for you I will see about moving that package onto npm.. the original maintainer doesn't seem to be taking pr's.

I'm free 8-9 AM cst on Wednesday if you would like to call to talk more. christopher@atlas.bi

ImNtReal commented 1 year ago

I'm a little confused about which line to comment out in package.json. Here's the top of the file:

{
  "description": "Atlas BI Library",
  "devDependencies": {
    "@babel/preset-env": "7.20.2",
    "@creativebulma/bulma-badge": "github:christopherpickering/bulma-badge",

I have been able to run git submodule update --remote --merge from my VS Code terminal with no issue.

christopherpickering commented 1 year ago

The line "@creativebulma/bulma-badge": "github:christopherpickering/bulma-badge", can be commented out, sorry, I had the line # wrong!

ImNtReal commented 1 year ago

I was able to get further, but I don't think the project is building correctly. npm start results in:

> gulp start

'gulp' is not recognized as an internal or external command,
operable program or batch file.
ImNtReal commented 1 year ago

npm install still results in:

npm http 304 https://registry.npmjs.org/semantic-release
npm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\lib\cache.js:753:14)
npm ERR!     at C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\lib\cache.js:841:12
npm ERR!     at saved (C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\node_modules\npm-registry-client\lib\get.js:148:7)
npm ERR!     at C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\node_modules\graceful-fs\polyfills.js:133:7
npm ERR!     at FSReqCallback.oncomplete (node:fs:188:23)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Windows_NT 10.0.17763
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\ProgramData\\chocolatey\\lib\\npm\\tools\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\jmpugh_dladm\atlas-bi-library
npm ERR! node -v v19.2.0
npm ERR! npm -v 1.4.9
npm ERR! code E405
npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/github:atlas-bi/bulma-steps)
npm WARN `git config --get remote.origin.url` returned wrong result (git@github.com:github:atlas-bi/bulma-steps)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\jmpugh_dladm\atlas-bi-library\npm-debug.log
npm ERR! not ok code 0
christopherpickering commented 1 year ago

Hey! It looks like you are blocked from downloading from GitHub by your network. There are a few more npm packages that are coming from github. In the error you have now it is for github:atlas-bi/bulma-steps.

You will need to either

  1. unblock GitHub
  2. remove all references to GitHub in the package.json file and manually download those packages.

I'm happy to give you a call to go through this with you.

ImNtReal commented 1 year ago

I've worked with my Network Team to make sure traffic isn't being blocked on the firewall and my Info Sec Team to make sure it's not getting filtered by web filtering. We did make some changes to the firewall, but it's still failing for me. It looks to me like the problem is the HTTP 405 errors the NPM registry is returning.

npm http 405 https://registry.npmjs.org/semantic-release/release-notes-generator
npm http 304 https://registry.npmjs.org/bulma-steps-component
npm http 304 https://registry.npmjs.org/semantic-release
npm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\lib\cache.js:753:14)
npm ERR!     at C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\lib\cache.js:841:12
npm ERR!     at saved (C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\node_modules\npm-registry-client\lib\get.js:148:7)
npm ERR!     at C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\node_modules\graceful-fs\polyfills.js:133:7
npm ERR!     at FSReqCallback.oncomplete (node:fs:188:23)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Windows_NT 10.0.17763
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\ProgramData\\chocolatey\\lib\\npm\\tools\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\jmpugh_dladm\atlas-bi-library
npm ERR! node -v v19.2.0
npm ERR! npm -v 1.4.9
npm ERR! code E405
christopherpickering commented 1 year ago

hmm It seems like something in the network is still not quite right. Can you try this suggestion in the package.json file, then try npm install again?

christopherpickering commented 1 year ago

oh just noticing your npm version.. 1.4. we are on 9.

can you try npm install npm@latest -g to update it?

christopherpickering commented 1 year ago

@ImNtReal Did you do a fresh install of node? I'm wondering how you got npm 1.4 and the latest npm should have come in when you installed node... or do you have any ideas how you managed to get that version?

ImNtReal commented 1 year ago

I just realized that as well. It was because I had installed npm separately from node, and it turns out that's an old package. I already had npm 8 installed along with node, so I removed the extra older version. It seems to be doing better.

ImNtReal commented 1 year ago

For anyone looking to install node on Windows using Chocolatey, don't also install npm. The separate package is older than the one that ships with node. Getting rid of the old version allowed me to complete the install. I've run into a database connection issue, but I will troubleshoot that, and open a different issue if I can't get past it.

Thanks for helping get this sorted.

christopherpickering commented 1 year ago

sweet!