大佬教程收集整理的这篇文章主要介绍了node.js – 无法在节点js中安装依赖项,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
jhonnatans-MACBook-Pro:chat jhonnatan$npm install npm ERR! install Couldn't read dependencies npm ERR! Failed to parse json npm ERR! Unexpected token / npm ERR! File: /Users/jhonnatan/Documents/cursoseccion2/clasenodejs/chat/package.json npm ERR! Failed to parse package.json data. npm ERR! package.json must be actual JSON,not just JavaScript. npm ERR! npm ERR! This is not a bug in npm. npm ERR! Tell the package author to fix their package.json file. JSON.parse npm ERR! System Darwin 12.3.0 npm ERR! command "node" "/usr/local/bin/npm" "install" npm ERR! cwd /Users/jhonnatan/Documents/cursoseccion2/clasenodejs/chat npm ERR! node -v v0.10.0 npm ERR! npm -v 1.2.14 npm ERR! file /Users/jhonnatan/Documents/cursoseccion2/clasenodejs/chat/package.json npm ERR! code EJSONPARSE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Users/jhonnatan/Documents/cursoseccion2/clasenodejs/chat/npm-debug.log npm ERR! not ok @R_565_6756@
这就是我的json的样子
{ // Aca definiremos nuestro package.json,lo primero es el nombre "name": "curso",// Luego la version del mismo "version": "0.0.1",// Ahora las dependencias,normalmente podrias hacer esto con npm pero es mucho mejor tener claro y ejecutar eStricatemente las necesaria "dependencies": { // Express el cual se encargara de ser nuestro framework en node "express": "",//los tipos de vista,jade parecido al que usa ruby on rails y swig parecido al que usa django "jade": "","swig": "",// El que se encargara de renderizar los templates en un contexto "consolidate": "",// y por ultimo el encargado de manejar los sockets :) "socket.io": "" }
}
iv一直在尝试很多,但我非常不知道可能会出现什么问题,我会感激有人可以让我知道这个问题!
以上是大佬教程为你收集整理的node.js – 无法在节点js中安装依赖项全部内容,希望文章能够帮你解决node.js – 无法在节点js中安装依赖项所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。