You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
5.9 KiB
Plaintext

app
.header
h1 Why is NPM broken?
.contents
p When something breaks in NPM, the error output usually isn't very clear about the cause. When you provide the full output, I will attempt to determine what is causing your problem, and propose a solution.
p This tool is entirely client-side and your input will never be sent to a server, so you don't need to redact information from your log. It's also open-source - you can find the source code for it <a href="https://git.cryto.net/joepie91/why-is-npm-broken">here</a>.
.important
p Enter the <strong>full output</strong> of your <code>npm install</code> command, from start to end. Otherwise, I might not be able to find your problem.
p Output from <code>npm-debug.log</code> will <strong>not</strong> usually work - make sure that you copy the output <em>from your terminal</em>.
codebox
hr
solution-viewer
style(type="scss").
body {
font-family: sans-serif;
background-color: white;
margin: 0;
padding: 0;
line-height: 1.4;
}
.contents, .header {
max-width: 960px;
margin: 0px auto;
padding: 14px 16px;
}
.contents {
background-color: #dddddd;
}
.header {
background-color: #b40000;
color: white;
h1 {
margin: 0;
}
}
.important {
background-color: #ffffa2;
border: 1px solid #c7c702;
border-radius: 4px;
padding: 6px 9px;
margin-bottom: 12px;
p {
margin: 6px 0px;
}
}
hr {
height: 1px;
border: 0;
background: #b40000;
margin: 32px 0px;
}
script.
const $ = require("jquery");
const analyzeError = require("../analyze-error");
this.mixin(require("riot-query").mixin);
this.queryOne("codebox").on("submit", (code) => {
try {
let results = analyzeError(code);
this.queryOne("solution-viewer").viewTopic(results.type, results.data);
} catch (err) {
this.queryOne("solution-viewer").viewTopic(false, {});
}
});
/*
this.on("mount", () => {
this.queryOne("codebox").setCode(`capaj@kukan:~/WebstormProjects/Q.OUT$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)
capaj@kukan:~/WebstormProjects/Q.OUT$ npm i zmq -S
> zmq@2.13.0 install /home/capaj/WebstormProjects/Q.OUT/node_modules/zmq
> node-gyp rebuild
make: Entering directory '/home/capaj/WebstormProjects/Q.OUT/node_modules/zmq/build'
CXX(target) Release/obj.target/zmq/binding.o
../binding.cc:28:17: fatal error: zmq.h: No such file or directory
../binding.cc:28:17: fatal error: zmq.h: No such file or directory
../binding.cc:28:17: fatal error: foo.h: No such file or directory
#include <zmq.h>
^
compilation terminated.
zmq.target.mk:90: recipe for target 'Release/obj.target/zmq/binding.o' failed
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/home/capaj/WebstormProjects/Q.OUT/node_modules/zmq/build'
gyp ERR! build error
gyp ERR! stack Error: \`make\` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/capaj/.nvm/versions/node/v4.1.0/lib/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 Linux 3.16.0-4-amd64
gyp ERR! command "/home/capaj/.nvm/versions/node/v4.1.0/bin/node" "/home/capaj/.nvm/versions/node/v4.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/capaj/WebstormProjects/Q.OUT/node_modules/zmq
gyp ERR! node -v v4.1.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN EPACKAGEJSON q.out@1.0.0 No license field.
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/home/capaj/.nvm/versions/node/v4.1.0/bin/node" "/home/capaj/.nvm/versions/node/v4.1.0/bin/npm" "i" "zmq" "-S"
npm ERR! node v4.1.0
npm ERR! npm v3.3.4
npm ERR! code ELIFECYCLE
npm ERR! zmq@2.13.0 install: \`node-gyp rebuild\`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.13.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the zmq 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 their info via:
npm ERR! npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/capaj/WebstormProjects/Q.OUT/npm-debug.log
`);
$("form", this.queryOne("codebox").root).submit();
})
*/