首页 > 解决方案 > 我该如何解决:parcel build index.html 不断给出错误:Unexpected token '{' let svgStr = tree.render(node) {

问题描述

PS C:\Users\dtstr\OneDrive\Documents\David's Programming Files\main> parcel build index.html × C:\Users\dtstr\OneDrive\Documents\David's Programming Files\main\index.html: Unexpected token '{'让 svgStr = tree.render(node) { ^

SyntaxError:NativeCompileCache._moduleCompile (C:\Users\dtstr\AppData\Roaming\npm\node_modules\parcel-bundler\node_modules\v8-compile-cache 的新脚本 (vm.js:101:7) 中出现意外令牌“{” \v8-compile-cache.js:240:18) 在 Module._compile (C:\Users\dtstr\AppData\Roaming\npm\node_modules\parcel-bundler\node_modules\v8-compile-cache\v8-compile-cache .js:184:36) 在 Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) 在 Module.load (internal/modules/cjs/loader.js:928:32)在 Function.Module._load (internal/modules/cjs/loader.js:769:14) 在 Module.require (internal/modules/cjs/loader.js:952:19) 在 require (C:\Users\dtstr\ AppData\Roaming\npm\node_modules\parcel-bundler\node_modules\v8-compile-cache\v8-compile-cache.js:159:20) 在 minifier (C:\Users\dtstr\AppData\Roaming\npm\node_modules\parcel-bundler\node_modules\htmlnano\lib\htmlnano.js:35:20) 在 C:\Users\dtstr\AppData\Roaming\npm\node_modules\parcel-bundler \node_modules\posthtml\lib\index.js:188:14

标签: parceljs

解决方案


推荐阅读