1

新手来了

我花了几个小时。目标是安装 Poylmer,我尝试安装 Bower 没有尽头。然后做 Poylmer zip 文件并将其放在 myproject 目录中。

我正在尝试做 10 分钟的教程 LOL,它需要凉亭,我还没有完全成功。Node、npm 和 Git 安装良好。冉更新。重新启动。再次尝试安装。

然后检查节点版本

  pi@raspberrypi ~ $ sudo apt-get install node
Reading package lists... Done
Building dependency tree       
Reading state information... Done
node is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded

仍然得到这个:

    pi@raspberrypi ~ $ sudo apt-get install bower
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package bower
pi@raspberrypi ~ $ sudo npm install -g bower
npm http GET http://registry.npmjs.org/bower
npm http 304 http://registry.npmjs.org/bower

npm ERR! Error: No compatible version found: bower
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR!     at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR!     at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR!     at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR!     at /usr/share/npm/lib/cache.js:408:5
npm ERR!     at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR!     at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR!     <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR!     reportbug --attach /home/pi/npm-debug.log npm
npm ERR! 
npm ERR! System Linux 3.18.7-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "bower"
npm ERR! cwd /home/pi
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: bower
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/npm-debug.log
npm not ok
pi@raspberrypi ~ $ 

我的最后期限快到了。非常感谢所有帮助。谢谢!

4

1 回答 1

-1

安装Bower使用npm对我有用。apt-get installBower不会工作。

尝试以下命令:sudo npm install -g bower

于 2019-08-16T07:52:13.607 回答