npm i stuck on "idealTree: timing idealTree Completed in XXXXms" - javascript

I've been trying to install dependencies in my nextjs project.
Upon running npm i in the project directory the command is stuck at "idealTree: timing idealTree Completed in XXXXms"
(Edit: The command is working in all directories except Downloads/)
I have tried the following as found in previous discussions about the topic:
Changing npm registry to http://
Turning off strict-ssl
Updating npm globally
Uninstalling & Reinstalling nodejs
Force cleaning node cache
Killing any node terminals running in background
Pointing PATH variables to right files
Deleting node_modules/ and package-lock.json
But none seem to work 😔
Node Version: 18.14.0
NPM Version: 9.4.1
OS: Windows 11 Home Single-Language
OS Version: 22H2
OS Build: 22621.1194
package.json file:
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "13.0.3",
"react": "18.2.0",
"react-dom": "18.2.0",
}
}
npm i log:
$ npm i -verbose
npm verb cli C:\Program Files\nodejs\node.exe C:\Users\aahan\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
npm info using npm#9.4.1
npm info using node#v18.14.0
npm verb title npm i
npm verb argv "i" "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:C:\Users\aahan\AppData\Local\npm-cache\_logs\2023-02-08T10_01_08_381Z-
npm verb logfile C:\Users\aahan\AppData\Local\npm-cache\_logs\2023-02-08T10_01_08_381Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/next 1267ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/fibers 339ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/node-sass 299ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/react 196ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/react-dom 274ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/sass 317ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fenv 410ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-android-arm64 540ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/loose-envify 578ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/styled-jsx 613ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/use-sync-external-store 619ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-linux-x64-gnu 626ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#swc%2Fhelpers 720ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-android-arm-eabi 716ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/scheduler 697ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-linux-arm64-gnu 735ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/postcss 760ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-freebsd-x64 758ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-linux-arm64-musl 808ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-linux-arm-gnueabihf 822ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-darwin-arm64 840ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-linux-x64-musl 844ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-win32-ia32-msvc 863ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-win32-arm64-msvc 880ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-win32-x64-msvc 1086ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/caniuse-lite 1334ms (cache updated)
npm http fetch GET 200 https://registry.npmjs.org/#next%2Fswc-darwin-x64 2319ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/source-map-js 192ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/picocolors 199ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/nanoid 210ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/tslib 220ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/client-only 1262ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/js-tokens 161ms (cache revalidated)
[#########.........] \ idealTree: timing idealTree Completed in 6984ms

Related

npm not working even after setting all proxy config

System Info
RELEASE=19
CODENAME=tara
EDITION="Cinnamon"
DESCRIPTION="Linux Mint 19 Tara"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_tara_cinnamon_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_tara_cinnamon.php
USER_GUIDE_URL=help:linuxmint
GRUB_TITLE=Linux Mint 19 Cinnamon
$which node
/usr/bin/node
$node -v
v8.10.0
$which npm
/usr/bin/npm
$npm -v
3.5.2
$cat ~/.npmrc
registry="http://registry.npmjs.org/"
proxy=http://usr:pwd#172.16.0.11:3128
strict-ssl=false
https-proxy=https://usr:pwd#172.16.0.11:3128
I have given my username and password accordingly
$sudo npm install -g ember-cli
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! fetch failed http://registry.npmjs.org/broccoli/-/broccoli-2.0.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 403
npm ERR! fetch failed http://registry.npmjs.org/broccoli-debug/-/broccoli-debug-0.6.5.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 403
npm ERR! fetch failed http://registry.npmjs.org/broccoli-funnel-reducer/-/broccoli-funnel-reducer-1.0.0.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 403
npm ERR! fetch failed http://registry.npmjs.org/broccoli-config-replace/-/broccoli-config-replace-1.1.2.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 403
npm ERR! fetch failed http://registry.npmjs.org/broccoli-funnel/-/broccoli-funnel-2.0.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 403
npm ERR! fetch failed http://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 403
npm ERR! fetch failed http://registry.npmjs.org/dag-map/-/dag-map-2.0.2.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 403
npm ERR! fetch failed http://registry.npmjs.org/console-ui/-/console-ui-2.2.2.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 403
I have installed both npm and nodejs using apt install
I have tried everything, I am not getting any scratch her.
I keep getting the same error.
I am sure about my network setting, apt works fine with the proxy setting too
What can be the fix?

When trying to execute an JavaScript file gives me an: SyntaxError: unexpected token ) [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
During the path on creating my chat application, I was trying to create my app.js file till I came across this easy/novice silly SyntaxError which I really don't think anything is wrong with it, but still causes issues for me to progress onwards, I tried adding additional parentheses, brackets or semicolons. But it wouldn't resolve itself :/
This is my app.js file:
var express = require('expres'),
//now in express you no longer create an http server automatically
//app variable is just a function that bundles together with basically everything in express
//for socket.io we need an http server object so, we need to create that manually
app = express(),
//create a variable called "server".
//requires http module, then "createServer" (creates a server) and then pass that data onto the "app" variable.
server = require('http').createServer(app),
//Then we need to create the socket functionality.
//create the variable called "io".
//The variable "io" which then requires "socket.io" and then we need to make it "listen".
//So this is why we need an http server, the parameter of "listen".
//socket.io listens to an http server object.
//So we need to pass it to "server"
io = require('socket.io').listen(server);
//Next: We actually need to tell the server itself on what port to listen on.
//Pick any available port, in this case "3000" within the option below.
server.listen(3000);
//After setting up the server
//We need to create a "route".
//Right now we can't access any pages.
//And this is where express makes somethings easier.
//Makes routing a bit easier.
//We are going to use the variable "app" . "get" function to get that variable which equals to the "express framework".
//Then we set the root directory "/" by a forward slash sign.
//So that's the first parameter on what the client is trying to access.
//And then just like without express we have a "function" with the "http request" and the "http response" as parameters.
app.get('/'), function(req, res){
//And then we declare the "http response" and . "sendfile" because, we are going to create a file called "index.html" that we want the client to get whenever it goes to "localhost:3000".
//Then create the "directory name" + the "index.html" web page.
res.sendfile(__dirname + '/index.html');
});
//Then to check if it works within command prompt execute the command: "node app.js"
//Which will run the javascript file.
And here is the result I get when I input the node app.js command!
I've installed socket.io by executing the command npm install socket.io but it still wouldn't help solve my issue. :/
C:\chatapplication>npm install socket.io
npm http GET https://registry.npmjs.org/socket.io/1.4.8
npm http 304 https://registry.npmjs.org/socket.io/1.4.8
unbuild socket.io#1.4.8
npm http GET https://registry.npmjs.org/engine.io/1.6.11
npm http GET https://registry.npmjs.org/socket.io-adapter/0.4.0
npm http GET https://registry.npmjs.org/socket.io-parser/2.2.6
npm http GET https://registry.npmjs.org/has-binary/0.1.7
npm http GET https://registry.npmjs.org/debug/2.2.0
npm http GET https://registry.npmjs.org/socket.io-client/1.4.8
npm http 304 https://registry.npmjs.org/socket.io-parser/2.2.6
npm http GET https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.6.tgz
npm http 304 https://registry.npmjs.org/engine.io/1.6.11
npm http 304 https://registry.npmjs.org/debug/2.2.0
npm http 304 https://registry.npmjs.org/socket.io-adapter/0.4.0
npm http 304 https://registry.npmjs.org/has-binary/0.1.7
npm http 304 https://registry.npmjs.org/socket.io-client/1.4.8
npm http GET https://registry.npmjs.org/engine.io/-/engine.io-1.6.11.tgz
npm http GET https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.4.0.tgz
npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.4.8.tgz
npm http GET https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz
npm http 200 https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.6.tgz
npm http 200 https://registry.npmjs.org/engine.io/-/engine.io-1.6.11.tgz
npm http 200 https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.4.8.tgz
npm http 200 https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.4.0.tgz
npm http GET https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/socket.io-parser/2.2.2
npm http GET https://registry.npmjs.org/ms/0.7.1
npm http GET https://registry.npmjs.org/json3/3.3.2
npm http GET https://registry.npmjs.org/component-emitter/1.1.2
npm http GET https://registry.npmjs.org/benchmark/1.0.0
npm http GET https://registry.npmjs.org/base64id/0.1.0
npm http GET https://registry.npmjs.org/engine.io-parser/1.2.4
npm http GET https://registry.npmjs.org/ws/1.1.0
npm http GET https://registry.npmjs.org/accepts/1.1.4
npm http 304 https://registry.npmjs.org/socket.io-parser/2.2.2
npm http 304 https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/engine.io-client/1.6.11
npm http GET https://registry.npmjs.org/component-emitter/1.2.0
npm http GET https://registry.npmjs.org/component-bind/1.0.0
npm http GET https://registry.npmjs.org/indexof/0.0.1
npm http GET https://registry.npmjs.org/object-component/0.0.3
npm http GET https://registry.npmjs.org/to-array/0.1.4
npm http GET https://registry.npmjs.org/parseuri/0.0.4
npm http 304 https://registry.npmjs.org/json3/3.3.2
npm http 304 https://registry.npmjs.org/ms/0.7.1
npm http GET https://registry.npmjs.org/backo2/1.0.2
npm http 304 https://registry.npmjs.org/benchmark/1.0.0
npm http 304 https://registry.npmjs.org/base64id/0.1.0
npm http 304 https://registry.npmjs.org/component-emitter/1.1.2
npm http GET https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.2.tgz
npm http 304 https://registry.npmjs.org/engine.io-parser/1.2.4
npm http 304 https://registry.npmjs.org/ws/1.1.0
npm http GET https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz
npm http 304 https://registry.npmjs.org/engine.io-client/1.6.11
npm http 304 https://registry.npmjs.org/component-emitter/1.2.0
npm http 304 https://registry.npmjs.org/accepts/1.1.4
npm http 304 https://registry.npmjs.org/component-bind/1.0.0
npm http 304 https://registry.npmjs.org/indexof/0.0.1
npm http GET https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz
npm http 304 https://registry.npmjs.org/object-component/0.0.3
npm http GET https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz
npm http GET https://registry.npmjs.org/json3/-/json3-3.3.2.tgz
npm http GET https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
npm http GET https://registry.npmjs.org/benchmark/-/benchmark-1.0.0.tgz
npm http 304 https://registry.npmjs.org/to-array/0.1.4
npm http 304 https://registry.npmjs.org/parseuri/0.0.4
npm http 304 https://registry.npmjs.org/backo2/1.0.2
npm http GET https://registry.npmjs.org/ws/-/ws-1.1.0.tgz
npm http GET https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.2.4.tgz
npm http GET https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.6.11.tgz
npm http GET https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.0.tgz
npm http GET https://registry.npmjs.org/accepts/-/accepts-1.1.4.tgz
npm http GET https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz
npm http GET https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz
npm http GET https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz
npm http GET https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz
npm http GET https://registry.npmjs.org/parseuri/-/parseuri-0.0.4.tgz
npm http 200 https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.2.tgz
npm http 200 https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz
npm http 200 https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
npm http 200 https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz
npm http 200 https://registry.npmjs.org/benchmark/-/benchmark-1.0.0.tgz
npm http 200 https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz
npm http 200 https://registry.npmjs.org/json3/-/json3-3.3.2.tgz
npm http 200 https://registry.npmjs.org/ws/-/ws-1.1.0.tgz
npm http 200 https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.2.4.tgz
npm http 200 https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.6.11.tgz
npm http 200 https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.0.tgz
npm http 200 https://registry.npmjs.org/accepts/-/accepts-1.1.4.tgz
npm http 200 https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz
npm http 200 https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz
npm http 200 https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz
npm http 200 https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz
npm http 200 https://registry.npmjs.org/parseuri/-/parseuri-0.0.4.tgz
npm http GET https://registry.npmjs.org/json3/3.2.6
npm http GET https://registry.npmjs.org/debug/0.7.4
npm http GET https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz
npm http 304 https://registry.npmjs.org/json3/3.2.6
npm http 304 https://registry.npmjs.org/debug/0.7.4
npm http GET https://registry.npmjs.org/json3/-/json3-3.2.6.tgz
npm http 200 https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz
npm http GET https://registry.npmjs.org/debug/-/debug-0.7.4.tgz
npm http 200 https://registry.npmjs.org/json3/-/json3-3.2.6.tgz
npm http GET https://registry.npmjs.org/mime-types
npm http GET https://registry.npmjs.org/negotiator/0.4.9
npm http 304 https://registry.npmjs.org/negotiator/0.4.9
npm http 200 https://registry.npmjs.org/debug/-/debug-0.7.4.tgz
npm http GET https://registry.npmjs.org/after/0.8.1
npm http GET https://registry.npmjs.org/arraybuffer.slice/0.0.6
npm http GET https://registry.npmjs.org/base64-arraybuffer/0.1.2
npm http GET https://registry.npmjs.org/has-binary/0.1.6
npm http GET https://registry.npmjs.org/blob/0.0.4
npm http GET https://registry.npmjs.org/utf8/2.1.0
npm http GET https://registry.npmjs.org/negotiator/-/negotiator-0.4.9.tgz
npm http 304 https://registry.npmjs.org/mime-types
npm http 304 https://registry.npmjs.org/blob/0.0.4
npm http GET https://registry.npmjs.org/blob/-/blob-0.0.4.tgz
npm http 304 https://registry.npmjs.org/utf8/2.1.0
npm http GET https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/ultron
npm http 304 https://registry.npmjs.org/arraybuffer.slice/0.0.6
npm http 304 https://registry.npmjs.org/after/0.8.1
npm http 304 https://registry.npmjs.org/base64-arraybuffer/0.1.2
npm http 304 https://registry.npmjs.org/has-binary/0.1.6
npm http GET https://registry.npmjs.org/utf8/-/utf8-2.1.0.tgz
npm http 200 https://registry.npmjs.org/negotiator/-/negotiator-0.4.9.tgz
npm http 304 https://registry.npmjs.org/ultron
npm http GET https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz
npm http GET https://registry.npmjs.org/after/-/after-0.8.1.tgz
npm http GET https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz
npm http GET https://registry.npmjs.org/has-binary/-/has-binary-0.1.6.tgz
npm http 200 https://registry.npmjs.org/blob/-/blob-0.0.4.tgz
npm http 200 https://registry.npmjs.org/has-binary/-/has-binary-0.1.6.tgz
npm http 200 https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz
npm http 200 https://registry.npmjs.org/utf8/-/utf8-2.1.0.tgz
npm http 200 https://registry.npmjs.org/after/-/after-0.8.1.tgz
npm http 304 https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/better-assert
npm http 200 https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz
npm http 304 https://registry.npmjs.org/better-assert
npm http GET https://registry.npmjs.org/callsite/1.0.0
npm http 304 https://registry.npmjs.org/callsite/1.0.0
npm http GET https://registry.npmjs.org/mime-db
npm http GET https://registry.npmjs.org/has-cors/1.1.0
npm http GET https://registry.npmjs.org/ws/1.0.1
npm http GET https://registry.npmjs.org/xmlhttprequest-ssl/1.5.1
npm http GET https://registry.npmjs.org/parsejson/0.0.1
npm http GET https://registry.npmjs.org/parseqs/0.0.2
npm http GET https://registry.npmjs.org/component-inherit/0.0.3
npm http GET https://registry.npmjs.org/yeast/0.1.2
npm http GET https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz
npm http GET https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.2.4.tgz
npm http 304 https://registry.npmjs.org/mime-db
npm http 304 https://registry.npmjs.org/parseqs/0.0.2
npm http 304 https://registry.npmjs.org/component-inherit/0.0.3
npm http GET https://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz
npm http 304 https://registry.npmjs.org/ws/1.0.1
npm http 304 https://registry.npmjs.org/has-cors/1.1.0
npm http GET https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz
npm http 304 https://registry.npmjs.org/yeast/0.1.2
npm http 304 https://registry.npmjs.org/xmlhttprequest-ssl/1.5.1
npm http 200 https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz
npm http 200 https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.2.4.tgz
npm http GET https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz
npm http GET https://registry.npmjs.org/ws/-/ws-1.0.1.tgz
npm http GET https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.1.tgz
npm http GET https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz
npm http 200 https://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz
npm http 200 https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz
npm http 200 https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz
npm http 200 https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz
npm http 200 https://registry.npmjs.org/ws/-/ws-1.0.1.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.1.tgz
npm http 304 https://registry.npmjs.org/parsejson/0.0.1
npm http GET https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz
npm http GET https://registry.npmjs.org/after/-/after-0.8.1.tgz
npm http GET https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz
npm http GET https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz
npm http GET https://registry.npmjs.org/has-binary/-/has-binary-0.1.6.tgz
npm http GET https://registry.npmjs.org/blob/-/blob-0.0.4.tgz
npm http 200 https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz
npm http 200 https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz
npm http 200 https://registry.npmjs.org/after/-/after-0.8.1.tgz
npm http 200 https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz
npm http 200 https://registry.npmjs.org/has-binary/-/has-binary-0.1.6.tgz
npm http 200 https://registry.npmjs.org/blob/-/blob-0.0.4.tgz
socket.io#1.4.8 node_modules\socket.io
├── has-binary#0.1.7 (isarray#0.0.1)
├── debug#2.2.0 (ms#0.7.1)
├── socket.io-parser#2.2.6 (isarray#0.0.1, component-emitter#1.1.2, json3#3.3.2, benchmark#1.0.0)
├── engine.io#1.6.11 (base64id#0.1.0, ws#1.1.0, engine.io-parser#1.2.4, accepts#1.1.4)
├── socket.io-adapter#0.4.0 (socket.io-parser#2.2.2)
└── socket.io-client#1.4.8 (component-emitter#1.2.0, to-array#0.1.4, indexof#0.0.1, component-bind#1.0.0, backo2#1.0.2, object-component#0.0.3, parseuri#0.0.4, engine.io-client#1.6.11)
C:\chatapplication>node app.js
C:\chatapplication\app.js:45
});
^
SyntaxError: Unexpected token )
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
C:\chatapplication>
Any ideas how I can resolve this issue, cause I don't seem to have any syntax errors in my opinion tbh :/
Thanks so much in advance.
app.get structure is:
app.get(path, callback [, callback ...])
Correct code is:
app.get('/', function(req, res){
//And then we declare the "http response" and . "sendfile" because, we are going to create a file called "index.html" that we want the client to get whenever it goes to "localhost:3000".
//Then create the "directory name" + the "index.html" web page.
res.sendfile(__dirname + '/index.html');
});
More about express routing here.
you have an additional closing bracket here
app.get('/'), function(req, res){

Stylus Not Defined After Successful npm install

I'm attempting to follow along with a tutorial and learn a bit about node.js. I keep getting a weird error, though. After npm install stylus, I get this:
npm http GET https://registry.npmjs.org/stylus
npm http 304 https://registry.npmjs.org/stylus
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/sax
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/sax
stylus#0.41.0 node_modules/stylus
├── debug#0.7.4
├── mkdirp#0.3.5
├── cssom#0.2.5
└── sax#0.5.5
No errors, nothing warning me of the world's end, not even any red text. Then when I try to run the application node app.js I get ReferenceError: stylus is not defined on this line:
app.use(stylus.middleware(
{
src: __dirname + '/public'
, compile: compile
}
))
npm install just create JS files on disk.
You still need to call require() to load the file and create a local variable:
var stylus = require('stylus');

Error executing Scripted editor: "Error showing url: The specified location is not supported"

I'm getting the following error when trying to open Scripted 0.3 from Springsource
Error showing url: The specified location is not supported
I'm using Kubuntu 12.10 64 bits and installed it using npm (sudo npm install -g scripted) with the following output:
npm http GET https://registry.npmjs.org/scripted
npm http 304 https://registry.npmjs.org/scripted
npm http GET https://registry.npmjs.org/amdefine/0.0.2
npm http GET https://registry.npmjs.org/enhanced-resolve/0.4.5
npm http GET https://registry.npmjs.org/express/2.5.11
npm http GET https://registry.npmjs.org/formidable/1.0.9
npm http GET https://registry.npmjs.org/htmlparser/1.7.6
npm http GET https://registry.npmjs.org/json5/0.1.0
npm http GET https://registry.npmjs.org/node-static/0.5.9
npm http GET https://registry.npmjs.org/sockjs/0.3.1
npm http GET https://registry.npmjs.org/when/1.6.1
npm http GET https://github.com/kdvolder/websocket-multiplex/archive/master.tar.gz
npm http 304 https://registry.npmjs.org/enhanced-resolve/0.4.5
npm http 304 https://registry.npmjs.org/htmlparser/1.7.6
npm http 304 https://registry.npmjs.org/json5/0.1.0
npm http 304 https://registry.npmjs.org/node-static/0.5.9
npm WARN node-static#0.5.9 dependencies field should be hash of <name>:<version-range> pairs
npm http 304 https://registry.npmjs.org/sockjs/0.3.1
npm http 304 https://registry.npmjs.org/express/2.5.11
npm http 304 https://registry.npmjs.org/amdefine/0.0.2
npm http 304 https://registry.npmjs.org/formidable/1.0.9
npm http 304 https://registry.npmjs.org/when/1.6.1
npm http 200 https://github.com/kdvolder/websocket-multiplex/archive/master.tar.gz
npm http GET https://registry.npmjs.org/mime/1.2.4
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/faye-websocket/0.4.0
npm http GET https://registry.npmjs.org/rbytes/0.0.2
npm http GET https://registry.npmjs.org/node-uuid/1.3.3
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/mime/1.2.4
npm http 304 https://registry.npmjs.org/faye-websocket/0.4.0
npm http 304 https://registry.npmjs.org/rbytes/0.0.2
npm http 304 https://registry.npmjs.org/node-uuid/1.3.3
npm http 304 https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/connect/-/connect-1.9.2.tgz
> rbytes#0.0.2 install /usr/local/lib/node_modules/scripted/node_modules/sockjs/node_modules/rbytes
> node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr
'configure' finished successfully (0.104s)
Waf: Entering directory `/usr/local/lib/node_modules/scripted/node_modules/sockjs/node_modules/rbytes/build'
[1/2] cxx: src/binding.cc -> build/Release/src/binding_1.o
npm http 200 https://registry.npmjs.org/connect/-/connect-1.9.2.tgz
[2/2] cxx_link: build/Release/src/binding_1.o -> build/Release/binding.node
Waf: Leaving directory `/usr/local/lib/node_modules/scripted/node_modules/sockjs/node_modules/rbytes/build'
'build' finished successfully (0.959s)
/usr/local/bin/scr -> /usr/local/lib/node_modules/scripted/bin/scr
/usr/local/bin/scripted -> /usr/local/lib/node_modules/scripted/bin/scripted
scripted#0.3.0 /usr/local/lib/node_modules/scripted
├── amdefine#0.0.2
├── node-static#0.5.9
├── when#1.6.1
├── websocket-multiplex#0.1.0
├── enhanced-resolve#0.4.5
├── json5#0.1.0
├── formidable#1.0.9
├── htmlparser#1.7.6
├── sockjs#0.3.1 (node-uuid#1.3.3 faye-websocket#0.4.0 rbytes#0.0.2)
└── express#2.5.11
I can't find any log files at the moment, is there any way to fix this?

npm fails to build socket.io with Error "Not compatible with your version of node/npm: commander#0.5.0"

I cloned socket.io from https://github.com/LearnBoost/socket.io.git bit it fails with the following Message
npm http GET https://registry.npmjs.org/socket.io-client/0.9.2
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.2
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http 304 https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
> ws#0.4.9 preinstall /usr/src/socket.io/node_modules/socket.io-client/node_modules/ws
> make
npm http GET https://registry.npmjs.org/zeparser/0.0.5
node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.105s)
Waf: Entering directory `/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws/build'
[1/4] cxx: src/validation.cc -> build/Release/src/validation_1.o
[2/4] cxx: src/bufferutil.cc -> build/Release/src/bufferutil_2.o
[3/4] cxx_link: build/Release/src/validation_1.o -> build/Release/validation.node
[4/4] cxx_link: build/Release/src/bufferutil_2.o -> build/Release/bufferutil.node
Waf: Leaving directory `/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws/build'
'build' finished successfully (1.634s)
npm http GET https://registry.npmjs.org/commander/0.5.0
npm http GET https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/commander/0.5.0
npm ERR! error rolling back ws#0.4.9 Error: ENOTEMPTY, rmdir '/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws'
npm ERR! error rolling back socket.io-client#0.9.2 Error: ENOTEMPTY, rmdir '/usr/src/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test'
npm ERR! Unsupported
npm ERR! Not compatible with your version of node/npm: commander#0.5.0
npm ERR! Required: {"node":">= 0.4.x < 0.7.0"}
npm ERR! Actual: {"npm":"1.1.10","node":"0.7.7-pre"}
npm ERR!
npm ERR! System Linux 2.6.38-11-generic
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /usr/src/socket.io
npm ERR! node -v v0.7.7-pre
npm ERR! npm -v 1.1.10
npm ERR! code ENOTSUP
npm ERR! message Unsupported
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/src/socket.io/npm-debug.log
npm not ok
My current version of node and npm is as follows
root#abhibhat-VirtualBox:/usr/src/socket.io# node -v
v0.7.7-pre
root#abhibhat-VirtualBox:/usr/src/socket.io# npm -v
1.1.10
root#abhibhat-VirtualBox:/usr/src/socket.io#
root#abhibhat-VirtualBox:/usr/src/socket.io# uname -a
Linux abhibhat-VirtualBox 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:18:14 UTC 2011 i686 i686 i386 GNU/Linux
root#abhibhat-VirtualBox:/usr/src/socket.io#
Is it that my node version is higher than the supported upper limit? If so what is the solution?
I am clueless as to how to proceed from here. Please !!HELP!!
npm -f install socket.io just solved the issue. I also checked package.json and there seems to be no upper limit "engines": { "node": ">= 0.4.0" }. Strangely I also had to issue npm -g list prior to issuing npm -f install, but how it solved the problem I am clueless.

Categories

Resources