Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

I installed npm, but nr1 still errors


#1

C:\Users\lycollicott>nr1 nerdpack:clone -r https://github.com/newrelic/nr1-browser-analyzer
x Error: You need npm to run this command
I’ve followed every instruction I can find about getting started with nerdpacks, but still have this problem.

C:\Users\me>nr1 nerdpack:clone -r https://github.com/newrelic/nr1-browser-analyzer
x Error: You need npm to run this command

C:\Users\me>npm -v
6.12.1


#2

Hey @Larry.Collicott -

That’s a known issue in Windows with our CLI… You will be able to run

git clone https://github.com/newrelic/nr1-browser-analyzer

which will pull down the nerdpack for you.


Note that running:

nr1 nerdpack:clone -r

Does a couple more steps, including running the following:

nr1 nerdpack:uuid -gf           // This regenerates the UUID for the nerdpack to register it to your CLI Profile. 
npm install        // ensures necessary packages are pulled down

Once you’ve git clone'd the repo, cd into it, and run the above commands manually, and then you should be good to go.


#3

Here is the output of all that…

C:\Users\me>git clone https://github.com/newrelic/nr1-browser-analyzer
Cloning into ‘nr1-browser-analyzer’…
remote: Enumerating objects: 106, done.
remote: Counting objects: 100% (106/106), done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 348 (delta 56), reused 66 (delta 32), pack-reused 242
Receiving objects: 100% (348/348), 3.43 MiB | 11.14 MiB/s, done.
Resolving deltas: 100% (171/171), done.

C:\Users\me>cd nr1-browser-analyzer

C:\Users\me\nr1-browser-analyzer>nr1 nerdpack:clone -r
x Error: You need npm to run this command

C:\Users\me\nr1-browser-analyzer>nr1 nerdpack:uuid -gf
Generated id is b577768e-5f6e-48ee-9a3d-d617c87ce34b

C:\Users\me\nr1-browser-analyzer>npm install
added 231 packages from 205 contributors and audited 561 packages in 28.118s
found 0 vulnerabilities

Then I go to https://one.newrelic.com/?nerdpacks=local and get this…

Local nerdpacks failed to load
You requested to load local nerdpacks for development through a query parameter, however we could not find a local server working on your machine.
Make sure you have got it working by running nr1 nerdpack:serve on your nerdpack, then reload the page. For further information, please proceed to the Development Center.
SIDs: dd9e652701d8edaf4767277b0c0a3370.nr-local.net

So, I follow that instruction…

C:\Users\me\nr1-browser-analyzer>nr1 nerdpack:serve
Nerdpack:
package.json:
√ name nr1-browser-analyzer
√ id b577768e-5f6e-48ee-9a3d-d617c87ce34b
Found and loaded 2 artifacts on nr1-browser-analyzer (b577768e-5f6e-48ee-9a3d-d617c87ce34b) Nerdpack.
Artifacts:
Nerdlets:
√ details nerdlets\details\nr1.json
√ root nerdlets\root\nr1.json

  • Built artifact files for:
  • b577768e-5f6e-48ee-9a3d-d617c87ce34b–details built √
  • b577768e-5f6e-48ee-9a3d-d617c87ce34b–root built √
  • b577768e-5f6e-48ee-9a3d-d617c87ce34b–styles built √
    √ Nerdpack built successfully!
    Starting as orchestrator…
    √ Server ready! Test it at: https://one.newrelic.com/?nerdpacks=local
    < Server will reload automatically if you modify any file!

Then I reload https://one.newrelic.com/?nerdpacks=local, and it doesn’t error, but it doesn’t show any nerdpacks and it just looks the same as https://one.newrelic.com.


#4

Hey @Larry.Collicott - sorry if my instructions were unclear, once you do git clone, you no longer need nr1 nerdpack:clone


following that yes, you will need to run the local server for New Relic One to show the nerdpack - which you can do either with npm start or nr1 nerdpack:serve


Once that Local nerdpacks failed to load error is no longer showing up, you are all set.

The reason the New Relic One homepage looks the same is that the Browser Analyser nerdpack is not served as it’s own launcher, instead it lives within Browser entities.

So - within New Relic One, open up the Entity Explorer -> Browser Apps -> Your App — you’ll then see a Site Analyser option in the left side menu bar that is where the Browser Analyser nerdpack lives.


#5

That isn’t there…

image


#6

Can you confirm you are at: https://one.newrelic.com/?nerdpacks=local - or just https://one.newrelic.com ??


#7

I’ve got this nerdpack permanently deployed to my account, so when I locally serve I see 2 Site Analysers… but this screenshot shows what that should look like:


#8

I was redirected to “regular” one, so went to a fresh browser and tried again. It worked that time and I test navigated around and took note that “?nerdpacks=local” remained in the URL.

Thanks!

(The docs could use some updates for this. It isn’t very intuitive to install something called “browser analyzer”, but in One it called something different.)


#9

How do you “permanently” deploy it?


#10

Glad it finally worked for you -

I know that the docs aren’t super full of programmability information - https://developer.newrelic.com is where that information lies.

To permanently deploy, you need another set of NR1 commands (which you’ll find at the developer site linked above):

nr1 nerdpack:publish

nr1 nerdpack:deploy -c DEV | BETA | STABLE   // Choose the deploy channel of your choice from these 3

nr1 nerdpack:subscribe -c DEV | BETA | STABLE    // Choose the same as your deploy channel