Giter Site home page Giter Site logo

Comments (9)

tdavis13 avatar tdavis13 commented on May 26, 2024 1

This can be closed now. Finally got it all working. Now, it is humming. Go figure out how to make it sing now.

from nr1-command-center.

khpeet avatar khpeet commented on May 26, 2024

Hello @tdavis13 ! Can you please provide the output of the following commands?

nr1 --version
nr1 profiles:list

It looks like there is an issue generating a cert for your default profile - which may not be set. Assuming the profile(account) that the nerdpack is being served to is not your default profile, you could try running nr1 nerdpack:serve with the --profile flag like this:

nr1 nerdpack:serve --profile=XXXXX_NonProd_US

from nr1-command-center.

tdavis13 avatar tdavis13 commented on May 26, 2024

nr1-command-center>nr1 --version
@datanerd/nr1/1.22.2 win32-x64 node-v10.16.3

nr1-command-center>nr1 profiles:list
Name Region API key


XXXXX_NonProd_US (default) us

from nr1-command-center.

khpeet avatar khpeet commented on May 26, 2024

@tdavis13 - are you able to successfully curl https://ca.service.newrelic.com/user/certificate ? You could also try to remove your certs directory located under .newrelic and try to run nr1 nerdpack:serve again.

Another common issue (especially on Windows) is file/directory permissions. I would make sure your user (or whatever user installed nr1 CLI) has read/write access to the .newrelic directory.

from nr1-command-center.

tdavis13 avatar tdavis13 commented on May 26, 2024

from nr1-command-center.

tdavis13 avatar tdavis13 commented on May 26, 2024

So, I wiped out the nr1-command-center directory I had and tried in a new location. Caught an error I may have missed before. On the download/unpack of the repository, I get an error with the uuid regeneration. Running just that command, I get:

nr1-command-center>nr1 nerdpack:uuid --generate --force
x Error: 401 - Your API key is missing or is invalid

i You can run this command with "--verbose" for more info.

nr1-command-center>nr1 nerdpack:uuid --generate --force --verbose
init version: @oclif/[email protected] argv: [ '--generate', '--force', '--verbose', [length]: 3 ]
Using profile XXXXX_NonProd_US
Request: POST https://artifact-registry.service.newrelic.com/graphql
Data: mutation {
generatePackageUuid
}
Headers: {
'API-Key': 'XXXXXXX',
'Content-Type': 'application/graphql'
}

x Error: 401 - Your API key is missing or is invalid

{ origin: 'service-gateway' }

I had dropped and recreated my only profile.

from nr1-command-center.

khpeet avatar khpeet commented on May 26, 2024

Yeah the .newrelic directory should be somewhere else- I spun up a windows machine and for me after going through the CLI install steps 1-4 found by clicking on the "New Relic One command line interface (CLI)" link located on this page: https://developer.newrelic.com/build-apps/set-up-dev-env ...

The .newrelic directory was located at C:\Users\<myUser>\.newrelic

from nr1-command-center.

tdavis13 avatar tdavis13 commented on May 26, 2024

Looks like I just had to dig out the 'right' API key. Now, I get a Syntax Error. But, this may be a different issues now.

[./nerdlets/nr1-command-center-nerdlet/alarms.js] 2.58 KiB {b7d5d057-55b3-4de8-bfe8-d7dd07d6fdbb--nr1-command-center-nerdlet} [built] [failed] [1 error]
[./nerdlets/nr1-command-center-nerdlet/index.js] 2.83 KiB {b7d5d057-55b3-4de8-bfe8-d7dd07d6fdbb--nr1-command-center-nerdlet} [built]
[nr1] external "__NR1_EXTERNAL_LIB__" 42 bytes {b7d5d057-55b3-4de8-bfe8-d7dd07d6fdbb--nr1-command-center-nerdlet} [built]
[react] external "React" 42 bytes {b7d5d057-55b3-4de8-bfe8-d7dd07d6fdbb--nr1-command-center-nerdlet} [built]

ERROR in ./nerdlets/nr1-command-center-nerdlet/alarms.js
Module build failed (from C:/Users/td013244/AppData/Local/newrelic-cli/client/1.22.2/node_modules/babel-loader/lib/index.js):
SyntaxError: c:\Users\td013244\Desktop\nr1-command-center\nerdlets\nr1-command-center-nerdlet\alarms.js: Unexpected token, expected "}" (41:12)

  39 |
  40 |     this.schema = {
> 41 |       "type": "object",
     |             ^
  42 |       "properties": {
  43 |         "accounts": {
  44 |           "type": "array",
    at Object._raise (C:\Users\td013244\AppData\Local\newrelic-cli\client\1.22.2\node_modules\@babel\parser\lib\index.js:742:17)
    at Object.raiseWithData (C:\Users\td013244\AppData\Local\newrelic-cli\client\1.22.2\node_modules\@babel\parser\lib\index.js:735:17)
    at Object.raise (C:\Users\td013244\AppData\Local\newrelic-cli\client\1.22.2\node_modules\@babel\parser\lib\index.js:729:17)
    at Object.unexpected (C:\Users\td013244\AppData\Local\newrelic-cli\client\1.22.2\node_modules\@babel\parser\lib\index.js:8757:16)
    at Object.expect (C:\Users\td013244\AppData\Local\newrelic-cli\client\1.22.2\node_modules\@babel\parser\lib\index.js:8743:28)
    at Object.jsxParseExpressionContainer (C:\Users\td013244\AppData\Local\newrelic-cli\client\1.22.2\node_modules\@babel\parser\lib\index.js:4468:10)
    at Object.jsxParseElementAt (C:\Users\td013244\AppData\Local\newrelic-cli\client\1.22.2\node_modules\@babel\parser\lib\index.js:4559:36)
    at Object.jsxParseElement (C:\Users\td013244\AppData\Local\newrelic-cli\client\1.22.2\node_modules\@babel\parser\lib\index.js:4602:17)
    at Object.parseExprAtom (C:\Users\td013244\AppData\Local\newrelic-cli\client\1.22.2\node_modules\@babel\parser\lib\index.js:4609:19)
    at Object.parseExprSubscripts (C:\Users\td013244\AppData\Local\newrelic-cli\client\1.22.2\node_modules\@babel\parser\lib\index.js:9602:23)
 @ ./nerdlets/nr1-command-center-nerdlet/index.js 14:0-30 49:48-54

Child
Hash: c2df752adee82316e500
Time: 3690ms
Built at: 08/03/2020 6:30:59 PM
Asset Size Chunks Chunk Names

from nr1-command-center.

khpeet avatar khpeet commented on May 26, 2024

glad you solved it! Yes that issue is solved by filling this pre-req:

Configured accountId within alarms.js (this.accountId = <your_account_id>)

Basically put the accountId of whatever account you are deploying it to.

from nr1-command-center.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.