salve, mi sto approcciando a node.js, ma ho un problema con npm.
Tentando di installare il modulo connect ho questa sfilza di errori.
codice:npm WARN install Couldn't install optional dependency: Unsupported > bufferutil@1.2.1 install C:\Users\admin\node_modules\bufferutil > node-gyp rebuild C:\Users\admin\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\admin\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Users\admin\node_modules\bufferutil\build\bufferutil.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. gyp ERR! build error gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\admin\node_modules\bufferutil gyp ERR! node -v v4.2.4 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild` npm WARN install:bufferutil@1.2.1 Exit status 1 > utf-8-validate@1.2.1 install C:\Users\admin\node_modules\utf-8-validate > node-gyp rebuild C:\Users\admin\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Users\admin\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Users\admin\node_modules\utf-8-validate\build\validation.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. gyp ERR! build error gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\admin\node_modules\utf-8-validate gyp ERR! node -v v4.2.4 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: `node-gyp rebuild` npm WARN install:utf-8-validate@1.2.1 Exit status 1 C:\Users\admin └── connect@3.4.0 npm WARN ENOENT ENOENT: no such file or directory, open 'C:\Users\admin\package.json' npm WARN EPACKAGEJSON admin No description npm WARN EPACKAGEJSON admin No repository field. npm WARN EPACKAGEJSON admin No README data npm WARN EPACKAGEJSON admin No license field.
come vedete tra i vari problemi tenta di installare il modulo in C:\Users\admin\node_modules
il percorso del mio progetto node.js è C:\Users\admin\Desktop\node.js\helloworld.
Ora ho diverse domande:
- c'è modo di fargli capire il path giusto del progetto?
- i moduli installati sono validi per il progetto, non per tutto il sistema, giusto?
- come risolvo questi problemi con npm una volta e per sempre..ho perfino installato .net framework 2.0 e python 2.7 per risolvere uno dei problemi che uscivano nel tentativo di installare il modulo connect

Rispondi quotando