node.js - 在角度 6 中在节点 app.js 中启动后端时出错
问题描述
当我在终端中使用 node app.js 命令以角度启动后端时,它会显示一些错误
我尝试了所有方法,例如npm-install
或npm-install --save
npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.7 npm WARN optional Skipping failed optional dependency /nodemon/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.7 npm WARN mongoose-type-url@1.0.5 requires a peer of mongoose@ but none was installed. npm ERR! Linux 4.15.0-44-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! file /home/suraj/contactly/sales-tool/salesapp/node_modules/.staging/encrypt-36282e46/package.json npm ERR! code EJSONPARSE npm ERR! Failed to parse json npm ERR! Unexpected token 'n' at 1:3 npm ERR! { name: 'encrypt', npm ERR! ^ npm ERR! File: /home/suraj/contactly/sales-tool/salesapp/node_modules/.staging/encrypt-36282e46/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! Please include the following file with any support request: npm ERR! /home/suraj/contactly/sales-tool/salesapp/npm-debug.log
想修复错误
解决方案
推荐阅读
- javascript - 检查电子邮件验证并在电子邮件阻止字段下给出错误
- tableau-api - 您能否从 Tableau Public 生成用户可以使用 Tableau Reader 读取的 .twbx 文件?
- react-native - 如何在我的应用程序中从网站获取图像
- javascript - 如何在 Javascript 中访问给定的字符串化数据
- javascript - THREE.js 中的 ID 渲染 + 漫反射渲染
- python - 循环输出以指数方式打印
- javascript - 如何限制使用 XML(或替代方法)查看我网站上的某些文件
- python - Transforming dataframe by making column using unique row values python pandas
- google-cloud-platform - 无法使用 GCS 创建新文件夹
- c++ - C++ strcpy 函数在少数主要情况下失败