npm list showing modules marked Extraneous

1,038 views
Skip to first unread message

Colin Law

unread,
Sep 15, 2016, 3:33:30 AM9/15/16
to node...@googlegroups.com
I need to use the latest version of node-red-dashboard from github so
I cloned the node from github into
.node-red/node_modules/node-red-dashboard, went into that directory
and ran
npm install

That all went ok and I added node-red-dashboard into the dependencies
in .node-red/package.json
Everything is now working except that if I run npm list then I see all
the devDependencies of the dashboard marked as extraneous

~/.node-red $ npm list
/home/user/.node-red
...
├─┬ node-red-...@2.0.2
│ ├── ang...@1.5.8 extraneous
│ ├── angular...@1.5.8 extraneous
│ ├── angula...@1.5.8 extraneous
...

I tried addding node-red-dashboard into the devDependencies in
package.json but that did not appear to make any difference.

Can someone tell me what I have missed please?

npm version 2.15.0
nodejs version 0.10.29

Regards

Colin

Dave C-J

unread,
Sep 15, 2016, 12:34:03 PM9/15/16
to node...@googlegroups.com
you should be able to install it using 
 npm i node-red/node-red-dashboard
which should install direct from github (but may depend on your version of npm)

Colin Law

unread,
Sep 15, 2016, 3:04:03 PM9/15/16
to node...@googlegroups.com
I assume that would not allow me just to use git pull to fetch the latest.

Should not what I have done work? I am sure I saw that recommended
somewhere as the way to do it. In fact it does work in all respects
except for the fact that it shows the devDependencies as extraneous.
I tried putting node-red-dashboard as a devDependency in my
package.json but that did not seem to help.

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> For more options, visit https://groups.google.com/d/optout.

Nicholas O'Leary

unread,
Sep 15, 2016, 3:15:04 PM9/15/16
to node...@googlegroups.com

Colin,

When you ran the npm install it would have installed the development dependencies. Those are only required if you are developing node-red-dashboard, which is why the are marked as extraneous.

If you run the npm install command with the --production option, it won't install the devDependencies.

Switching to what Dave said, npm knows how to pull code from a github repository and install it. So doing 'npm install node-red/node-red-dashboard' will do the git clone for you and will not install the devDependencies you are concerned about.

Nick


To post to this group, send an email to node...@googlegroups.com.

Colin Law

unread,
Sep 15, 2016, 3:56:24 PM9/15/16
to node...@googlegroups.com
On 15 September 2016 at 20:14, Nicholas O'Leary <nick....@gmail.com> wrote:
> Colin,
>
> When you ran the npm install it would have installed the development
> dependencies. Those are only required if you are developing
> node-red-dashboard, which is why the are marked as extraneous.
>
> If you run the npm install command with the --production option, it won't
> install the devDependencies.

Oh yes, that makes sense. I removed node-red-dashboard/node_modules
and ran the install again with --production and that fixed it. Many
thanks.

>
> Switching to what Dave said, npm knows how to pull code from a github
> repository and install it. So doing 'npm install
> node-red/node-red-dashboard' will do the git clone for you and will not
> install the devDependencies you are concerned about.

I tried that and it does correctly install the version from git.
However it seems that it downloads the latest rather than cloning, as
I am not left with a .git folder and cannot run git fetch to update to
the latest, or git log etc.

Thanks

Colin

Nicholas O'Leary

unread,
Sep 15, 2016, 3:58:01 PM9/15/16
to Node-RED Mailing List
Colin,

> However it seems that it downloads the latest rather than cloning, as
I am not left with a .git folder and cannot run git fetch to update to
the latest, or git log etc.

right - it doesn't do that. It does a proper npm install of the node, using the git repo as the source. You would use npm update to refresh it as you would any normally installed module.

Nick​

Colin Law

unread,
Sep 15, 2016, 4:00:43 PM9/15/16
to node...@googlegroups.com
OK, got it, thanks

Colin
Reply all
Reply to author
Forward
0 new messages