cd ~/.node-red
npm init -y
npm ERR! Invalid name: ".node-red"
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/868aea9f-3e07-4499-84e4-0ed413e1e202%40googlegroups.com.
The problem is the -y used in the npm init command - nothing to do with platform.When you run "npm init" it asks a bunch of questions to get some values into the package.json file it will create. The default value it suggests for the name field is the name of the directory you are running the command in - in this instance, .node-red. Using the -y option is a shortcut to accept all default values. As per the error message, .node-red is not a valid name for an npm module so the command fails.The fix is simply not to use the -y argument and, when it suggests the .node-red value for the 'name' field, change it to something else like 'my-node-red-module'.Nick
On 21 April 2017 at 20:49, Julian Knight <j.kni...@gmail.com> wrote:
OK, so what platform are you on?If you are on Windows, CMD prompt doesn't have ~ defined. If you are Using Windows 10, switch to PowerShell which does have it defined. Otherwise, mentally translate ~ into %USERPROFILE%If that is not the problem, we need to understand how you installed Node-RED and whether you changed the default userDir.
On Thursday, 20 April 2017 22:59:03 UTC+1, Jéan Roux wrote:Hi Julian, for some reason my install does not have a ~/.node-red/package.json file, and that causes problems. I followed your advise 'how can I make re-intallation of nodes easier' on the cookbook github wiki, here How can I make reinstallation of nodes easier, which is also the same advise out on the web for this problem. 1st ran this command,
cd ~/.node-rednpm init -yBut then I get:
npm ERR! Invalid name: ".node-red"So, I still do not have a package.json, with all kinds of issues when you want to add / remove nodes. Any advise?
--
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.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/uee8qP5lFx0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/06193226-ec64-41ad-a4cd-3931744a4904%40googlegroups.com.
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+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/CAL09UJNgnTCmiVDZZZofP5mSpUQX7QDEBPZs-VZQZ4czkzzHEQ%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/CAF%3DvhqeUv1T_EQJQGS5YiOxh-NHaU-B9v0-%2BXXae1KdGZA-FyQ%40mail.gmail.com.
Okay, I am not sure I have followed this to the end....So, if you do not have a package.json,
- you can create one with running npm init (not with -y), do not use the default, which is the directory, i.e. node-red, as it cannot accept a '.', name anytung, something like 'MyNodeRedModules' will work, all others just accept the defaults.
- Then, you edit the created package.json, as the created one will not allow upgrades of the packages,
- do this by ...... ????? ^ ....
Julian, maybe you could use this to update your cookbook on how I can make the reinstallation easier .... ?But, I still have broken system, si I am interested in the editing part of the package.json .....Thanks all.
On 25 April 2017 at 14:31, Julian Knight <j.kni...@gmail.com> wrote:
Ah, I see - I learned something new! Again!! Don't think I've ever done it that way round so I'd never noticed it did that.
On Tuesday, 25 April 2017 13:12:11 UTC+1, Dave C-J wrote:yes indeed it is... BUT the point being that the automatically generated package.json file doesn't have any of the ^ or ~ modifiers to relax the constraints so by default it pins nodes to the exact version you installed. (so npm update ... won't)
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/uee8qP5lFx0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/83869f53-1941-4514-9f04-8427c1ec399e%40googlegroups.com.
Thanks Julian !