Thanks for the tutorial, but I won't do that, it's like we say in Germany: "mit Kanonen auf Spatzen schiessen" (shooting with canons on sparrows). Also, I can't install software, because I'm on a shared system w/o root.
best,
Tom
Thanks for the tutorial, but I won't do that, it's like we say in Germany: "mit Kanonen auf Spatzen schiessen" (shooting with canons on sparrows). Also, I can't install software, because I'm on a shared system w/o root.
best,
Tom
@julian said in Upgrade from 1.8.1 to 1.8.2 failed:
Yes... that's correct. If you want, you can set
package_manager
toyarn
, so the nodebb upgrade process uses yarn as well.Then you should be good to go.
ok, I'll try this on production tomorrow.
Thanks for you help so far!
Well, at least I didn't add them as I don't have any clue about this stuff This is how I started: git clone -b v1.7.5 https://github.com/NodeBB/NodeBB.git nodebb
.
Thanks goodness, now it went through with success.
What next? Do I still need to execute ./nodebb upgrade
?
Eh... paste your package.json please
Ah, how is it "my" package.json
? It came with NodeBB
Well, here it is:
{
"name": "nodebb",
"license": "GPL-3.0",
"description": "NodeBB Forum",
"version": "0.8.2",
"homepage": "http://www.nodebb.org",
"repository": {
"type": "git",
"url": "https://github.com/NodeBB/NodeBB/"
},
"main": "app.js",
"scripts": {
"start": "node loader.js",
"test": "mocha ./tests -t 10000"
},
"dependencies": {
"async": "~1.4.2",
"bcryptjs": "~2.2.1",
"body-parser": "^1.9.0",
"colors": "^1.1.0",
"compression": "^1.1.0",
"connect-ensure-login": "^0.1.1",
"connect-flash": "^0.1.1",
"connect-multiparty": "^2.0.0",
"cookie-parser": "^1.3.3",
"cron": "^1.0.5",
"csurf": "^1.6.1",
"daemon": "~1.1.0",
"express": "^4.9.5",
"express-session": "^1.8.2",
"gravatar": "^1.1.0",
"less": "^2.0.0",
"logrotate-stream": "^0.2.3",
"lru-cache": "^2.6.1",
"lwip": "0.0.7",
"mime": "^1.3.4",
"minimist": "^1.1.1",
"mkdirp": "~0.5.0",
"mmmagic": "^0.4.0",
"morgan": "^1.3.2",
"nconf": "~0.7.1",
"nodebb-plugin-composer-default": "1.0.14",
"nodebb-plugin-dbsearch": "0.2.16",
"nodebb-plugin-emoji-extended": "0.4.13",
"nodebb-plugin-markdown": "4.0.5",
"nodebb-plugin-mentions": "1.0.2",
"nodebb-plugin-soundpack-default": "0.1.4",
"nodebb-plugin-spam-be-gone": "0.4.2",
"nodebb-rewards-essentials": "0.0.5",
"nodebb-theme-lavender": "2.0.1",
"nodebb-theme-persona": "3.0.13",
"nodebb-theme-vanilla": "4.0.8",
"nodebb-widget-essentials": "2.0.1",
"npm": "^2.1.4",
"passport": "^0.3.0",
"passport-local": "1.0.0",
"prompt": "^0.2.14",
"request": "^2.44.0",
"rimraf": "~2.4.2",
"rss": "^1.0.0",
"semver": "^5.0.1",
"serve-favicon": "^2.1.5",
"sitemap": "^1.0.0",
"socket.io": "^1.2.1",
"socket.io-client": "^1.2.1",
"socket.io-redis": "^0.1.3",
"socketio-wildcard": "~0.1.1",
"string": "^3.0.0",
"templates.js": "0.2.10",
"touch": "1.0.0",
"uglify-js": "^2.4.24",
"underscore": "~1.8.3",
"underscore.deep": "^0.5.1",
"validator": "^4.0.5",
"winston": "^1.0.1",
"xregexp": "~2.0.0"
},
"devDependencies": {
"mocha": "~1.13.0",
"grunt": "~0.4.5",
"grunt-contrib-watch": "^0.6.1"
},
"bugs": {
"url": "https://github.com/NodeBB/NodeBB/issues"
},
"engines": {
"node": ">=0.10"
},
"maintainers": [
{
"name": "Andrew Rodrigues",
"email": "[email protected]",
"url": "https://github.com/psychobunny"
},
{
"name": "Julian Lam",
"email": "[email protected]",
"url": "https://github.com/julianlam"
},
{
"name": "Barı�<9F> Soner U�<9F>aklı",
"email": "[email protected]",
"url": "https://github.com/barisusakli"
}
]
}
Pretty sure you can remove lwip from there.
Ok, I did ... and ran into the same compilation error with some module named mmagic
.
Nope.
What's interesting though is that it tries to upgrade /package/host/localhost/nodejs-6.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
which is a global package.
Yes, but how?
If you are seeing weird npm errors, remember to delete
npm-shrinkwrap.json
,package-lock.json
, as well as clearing cache and such.
I did.
Double-check your package.json to make sure it doesn't require node-gyp or heapdump, we shouldn't require those.
Doesn't.
Honestly if all else fails... install yarn, set
package_manager
inconfig.json
toyarn
, and thenyarn
...
I don't understand. Especially, since before 1.8.2 I had no problem upgrading, I started at 1.7.5 and did it twice successfully.
It's a desaster
well, its many dozen pages of output everytime.
different errors:
[..]
../../nan/nan.h:1550: error: ISO C++ forbids declaration of ‘Handle’ with no type
../../nan/nan.h:1550: error: invalid use of ‘::’
../../nan/nan.h:1550: error: expected ‘;’ before ‘<’ token
../../nan/nan.h:1588: error: expected ‘;’ before ‘}’ token
../../nan/nan.h: In constructor ‘NanCallback::NanCallback()’:
../../nan/nan.h:1481: error: no matching function for call to ‘NanAssignPersistent(v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >&, v8::Local<v8::Object>&)’
../../nan/nan.h: In constructor ‘NanAsyncWorker::NanAsyncWorker(NanCallback*)’:
../../nan/nan.h:1598: error: no matching function for call to ‘NanAssignPersistent(v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >&, v8::Local<v8::Object>&)’
../../nan/nan.h: In member function ‘virtual void NanAsyncWorker::HandleOKCallback()’:
../../nan/nan.h:1648: error: ‘class NanCallback’ has no member named ‘Call’
../../nan/nan.h: In member function ‘virtual void NanAsyncWorker::HandleErrorCallback()’:
../../nan/nan.h:1657: error: ‘class NanCallback’ has no member named ‘Call’
../../nan/nan.h: At global scope:
../../nan/nan.h:1957: error: ‘Handle’ is not a member of ‘v8’
../../nan/nan.h:1957: error: expected primary-expression before ‘>’ token
../../nan/nan.h:1957: error: ‘val’ was not declared in this scope
../../nan/nan.h:1958: error: expected primary-expression before ‘const’
../../nan/nan.h:1959: error: expected primary-expression before ‘*’ token
../../nan/nan.h:1959: error: ‘len’ was not declared in this scope
../../nan/nan.h:1960: error: initializer expression list treated as compound expression
../../nan/nan.h:1960: error: expected ‘,’ or ‘;’ before ‘{’ token
../../nan/nan.h:1957: warning: ‘_NanGetExternalParts’ defined but not used
make: *** [Release/obj.target/validation/src/validation.o] Error 1
make: Leaving directory `/home/curv/tmp/nodebb/node_modules/utf-8-validate/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/package/host/localhost/nodejs-6.13.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Linux 2.6.32-696.18.7.el6.x86_64
gyp ERR! command "/package/host/localhost/nodejs-6.13.1/bin/node" "/package/host/localhost/nodejs-6.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/curv/tmp/nodebb/node_modules/utf-8-validate
gyp ERR! node -v v6.13.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
[email protected] /home/curv/tmp/nodebb
└─┬ [email protected]
└── [email protected] (git://github.com/wzrdtales/simple-recaptcha.git#f408725106872df696436ff6a988923539ab80a6)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/utf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
Oh, I just found the module: /home/curv/.npm/heapdump/0.3.7
it's installed within my home directory as well!
I removed it and repeated the above procedure to no avail
Next, I looked where heapdump
is being referenced and found npm-shrinkwrap.json
from where I removed it as well.
Repeat the procedure. No more "heapdump" errors, but still no success and lots of compiler errors, here's the end of it:
[..]
../node_modules/nan/nan.h:1598: error: no matching function for call to ‘NanAssignPersistent(v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >&, v8::Local<v8::Object>&)’
../node_modules/nan/nan.h: In member function ‘virtual void NanAsyncWorker::HandleOKCallback()’:
../node_modules/nan/nan.h:1648: error: ‘class NanCallback’ has no member named ‘Call’
../node_modules/nan/nan.h: In member function ‘virtual void NanAsyncWorker::HandleErrorCallback()’:
../node_modules/nan/nan.h:1657: error: ‘class NanCallback’ has no member named ‘Call’
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:1957: error: ‘Handle’ is not a member of ‘v8’
../node_modules/nan/nan.h:1957: error: expected primary-expression before ‘>’ token
../node_modules/nan/nan.h:1957: error: ‘val’ was not declared in this scope
../node_modules/nan/nan.h:1958: error: expected primary-expression before ‘const’
../node_modules/nan/nan.h:1959: error: expected primary-expression before ‘*’ token
../node_modules/nan/nan.h:1959: error: ‘len’ was not declared in this scope
../node_modules/nan/nan.h:1960: error: initializer expression list treated as compound expression
../node_modules/nan/nan.h:1960: error: expected ‘,’ or ‘;’ before ‘{’ token
../node_modules/nan/nan.h:1957: warning: ‘_NanGetExternalParts’ defined but not used
make: *** [Release/obj.target/validation/src/validation.o] Error 1
make: Leaving directory `/home/curv/tmp/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/package/host/localhost/nodejs-6.13.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Linux 2.6.32-696.18.7.el6.x86_64
gyp ERR! command "/package/host/localhost/nodejs-6.13.1/bin/node" "/package/host/localhost/nodejs-6.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/curv/tmp/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v6.13.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
[email protected] node_modules/console-control-strings -> node_modules/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings
[email protected] node_modules/gauge -> node_modules/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge
[email protected] node_modules/set-blocking -> node_modules/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking
[email protected] node_modules/readable-stream -> node_modules/npm/node_modules/npm-registry-client/node_modules/readable-stream
[email protected] node_modules/are-we-there-yet -> node_modules/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet
[email protected] /home/curv/tmp/nodebb
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└── [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
Now what?
I'm not sure if I agree with npm's idea of package management:
% npm r heapdump
npm ERR! Linux 2.6.32-696.18.7.el6.x86_64
npm ERR! argv "/package/host/localhost/nodejs-6.13.1/bin/node" "/package/host/localhost/nodejs-6/bin/npm" "r" "heapdump"
npm ERR! node v6.13.1
npm ERR! npm v3.10.10
npm ERR! path /home/curv/tmp/nodebb/node_modules/nodebb-plugin-write-api
npm ERR! code EISGIT
npm ERR! git /home/curv/tmp/nodebb/node_modules/nodebb-plugin-write-api: Appears to be a git repo or submodule.
npm ERR! git /home/curv/tmp/nodebb/node_modules/nodebb-plugin-write-api
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
npm ERR! Please include the following file with any support request:
npm ERR! /home/curv/tmp/nodebb/npm-debug.log
WTF?
However, since this is a test folder anyway, I just removed the plugin, did the npm r heapdump && npm cache clean
, removed "heapdump" from package.json
, checked if it is referenced in any other module (it is not), checked if the directory node_modules/heapdump
doesn't exist anymore (it didn't) and executed npm i
afterwards.
It seems that it updated all the required modules, it displayed the long final tree. But in the end, there were still compiling errors and it finishes with:
npm ERR! Linux 2.6.32-696.18.7.el6.x86_64
npm ERR! argv "/package/host/localhost/nodejs-6.13.1/bin/node" "/package/host/localhost/nodejs-6/bin/npm" "i"
npm ERR! node v6.13.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the heapdump package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs heapdump
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls heapdump
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/curv/tmp/nodebb/npm-debug.log
Compiler errors are the same, I'm not going to post them again.
no idea?
I installed the write-api plugin, created a master token and I am able to access the usual suspects such as /api/users
or /api/topics
via the read-api.
However, I cannot access backend url's:
% curl -H "Authorization: Bearer $token" "https://www.foo.bar/api/admin/manage/privileges/?_uid=1"
"not-authorized"
If I access this url via chrome (once logged in into the admin backend), I get JSON output as expected.
Is this unsupported or am I doing something wrong?
best,
Tom
Ah, that explains it! Searching for Semmelknödel
reveals 1 topic and 2 posts (which is correct). So, we have to seach for whole words until partial matches are supported sometime.
Ok, still a little annoying for the girls, but I'm going to blame you
However, thanks for clarifying @baris !
best,
Tom
@serdo said in Upgrade from 1.8.1 to 1.8.2 failed:
How can I install the script?
pls open your own thread, thx.
I also tried:
rm -rf node_modules
npm cache clear
npm i
with the same results and any nodejs version: it fails to build heapdump.
So, I'm offline now, any help is very appreciated!
Tom
It also fails with node 8:
1005 verbose stack Error: [email protected] install: `node-gyp rebuild`
1005 verbose stack Exit status 1
1005 verbose stack at EventEmitter.<anonymous> (/package/host/localhost/nodejs-8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
1005 verbose stack at emitTwo (events.js:126:13)
1005 verbose stack at EventEmitter.emit (events.js:214:7)
1005 verbose stack at ChildProcess.<anonymous> (/package/host/localhost/nodejs-8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
1005 verbose stack at emitTwo (events.js:126:13)
1005 verbose stack at ChildProcess.emit (events.js:214:7)
1005 verbose stack at maybeClose (internal/child_process.js:925:16)
1005 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
1006 verbose pkgid [email protected]
1007 verbose cwd /home/curv/nodebb
1008 verbose Linux 2.6.32-696.18.7.el6.x86_64
1009 verbose argv "/package/host/localhost/nodejs-8.10.0/bin/node" "/package/host/localhost/nodejs-8/bin/npm" "i" "--production"
1010 verbose node v8.10.0
1011 verbose npm v5.6.0
1012 error code ELIFECYCLE
1013 error errno 1
1014 error [email protected] install: `node-gyp rebuild`
1014 error Exit status 1
1015 error Failed at the [email protected] install script.
1015 error This is probably not a problem with npm. There is likely additional logging output above.
1016 verbose exit [ 1, true ]
I wanted to upgrade to 1.8.2 today but ./nodebb upgrade
failed with:
[..]
74034 verbose stack Error: [email protected] install: `node-gyp rebuild`
74034 verbose stack Exit status 1
74034 verbose stack at EventEmitter.<anonymous> (/package/host/localhost/nodejs-6.13.1/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
74034 verbose stack at emitTwo (events.js:106:13)
74034 verbose stack at EventEmitter.emit (events.js:191:7)
74034 verbose stack at ChildProcess.<anonymous> (/package/host/localhost/nodejs-6.13.1/lib/node_modules/npm/lib/utils/spawn.js:40:14)
74034 verbose stack at emitTwo (events.js:106:13)
74034 verbose stack at ChildProcess.emit (events.js:191:7)
74034 verbose stack at maybeClose (internal/child_process.js:920:16)
74034 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
74035 verbose pkgid [email protected]
74036 verbose cwd /home/curv/nodebb
74037 error Linux 2.6.32-696.18.7.el6.x86_64
74038 error argv "/package/host/localhost/nodejs-6.13.1/bin/node" "/package/host/localhost/nodejs-6/bin/npm" "i" "--production"
74039 error node v6.13.1
74040 error npm v3.10.10
74041 error code ELIFECYCLE
74042 error [email protected] install: `node-gyp rebuild`
74042 error Exit status 1
74043 error Failed at the [email protected] install script 'node-gyp rebuild'.
74043 error Make sure you have the latest version of node.js and npm installed.
74043 error If you do, this is most likely a problem with the heapdump package,
74043 error not with npm itself.
74043 error Tell the author that this fails on your system:
74043 error node-gyp rebuild
74043 error You can get information on how to open an issue for this project with:
74043 error npm bugs heapdump
74043 error Or if that isn't available, you can get their info via:
74043 error npm owner ls heapdump
74043 error There is likely additional logging output above.
74044 verbose exit [ 1, true ]
Now what? (and, how do I downgrade?)