我刚安装MacOS的莫哈韦沙漠,并安装最新版本node 12.1.0,npm 6.9.0,brew 2.1.1和Python 2.7.10 on darwin。我在 package.json 中为项目运行 npm install"sqlite3": "4.0.6" 并收到以下日志消息,该消息在 sqlite3@4.0.6 安装脚本中失败。如何修复错误并成功安装 SQLite?它正在破坏并在 v8 函数中显示错误日志,这是错误日志的部分快照,我删除了一些 v8 错误以发布日志。
? npm install
> sqlite3@4.0.6 install /Users/default/Desktop/personal/default/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.6/node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.6 and node@12.1.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3260000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) …Run Code Online (Sandbox Code Playgroud) 我试图映射对象数组,每个数组包含另一个嵌套的对象数组。但是,该映射不适用于嵌套数组。如何在嵌套数组的内容上进行映射,同时保持所有父对象content的相同title?
小提琴: https : //jsfiddle.net/69z2wepo/249197/
数据结构如下:
[
{
title: "title1",
content: [
{
imageUrl: "http://placehold.it/300x300",
title: "Campaigns",
description:
"Short description explaining the use of this design in a single sentence."
},
{
imageUrl: "http://placehold.it/300x300",
title: "Events",
description:
"Short description explaining the use of this design in a single sentence."
},
{
imageUrl: "http://placehold.it/300x300",
title: "General",
description:
"Short description explaining the use of this design in a single sentence."
}
]
},
{
title: "title2",
content: [ …Run Code Online (Sandbox Code Playgroud)