Problem with npm link

(Thomas) #1

Hey there,

I tried to use npm link like described in the node-red doc: https://nodered.org/docs/creating-nodes/packaging
But I come up to an error log file telling me to share my Problem with you:
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’,
1 verbose cli ‘/usr/bin/npm’,
1 verbose cli ‘link’,
1 verbose cli ‘/usr/lib/node_modules/Tank102LevelValue’ ]
2 info using npm@6.9.0
3 info using node@v10.15.3
4 verbose npm-session 313d4361091e8ae2
5 verbose stack Error: Argument #2: Expected array but got string
5 verbose stack at EventEmitter.install (/usr/lib/node_modules/npm/lib/install.js:190:3)
5 verbose stack at Object.commandCache.(anonymous function) (/usr/lib/node_modules/npm/lib/npm.js:156:13)
5 verbose stack at /usr/lib/node_modules/npm/lib/link.js:93:24
5 verbose stack at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:285:20
5 verbose stack at FSReqWrap.oncomplete (fs.js:154:5)
6 verbose cwd /home/demo/.node-red
7 verbose Linux 4.13.0-36-generic
8 verbose argv “/usr/bin/node” “/usr/bin/npm” “link” “/usr/lib/node_modules/Tank102LevelValue”
9 verbose node v10.15.3
10 verbose npm v6.9.0
11 error code EINVALIDTYPE
12 error typeerror Error: Argument #2: Expected array but got string
12 error typeerror at EventEmitter.install (/usr/lib/node_modules/npm/lib/install.js:190:3)
12 error typeerror at Object.commandCache.(anonymous function) (/usr/lib/node_modules/npm/lib/npm.js:156:13)
12 error typeerror at /usr/lib/node_modules/npm/lib/link.js:93:24
12 error typeerror at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:285:20
12 error typeerror at FSReqWrap.oncomplete (fs.js:154:5)
13 error typeerror This is an error with npm itself. Please report this error at:
13 error typeerror https://npm.community
14 verbose exit [ 1, true ]

I am running on Ubuntu 16.04 LTS 64-bit in a virtualbox.
The package.json I try to link is:
{
“name”: “Tank102LevelValue”,
“version”: “1.0.0”,
“description”: “undefined”,
“main”: “node”,
“node-red”: {
“nodes”: {
“Tank102LevelValue”: “Tank102LevelValue.js”,
“Tank102OverflowStatus”: “Tank102OverflowStatus.js”
}
}
}

Actually I have no clue about what the .log is telling me. I checked my versions, they are up to date.

Somebody has any hints?

0 Likes

(John Gee) #2

You can get a cryptic error like this if you get the link name wrong: Incorrect folder name for npm link gives unhelpful error

0 Likes

(system) closed #3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

0 Likes