silly-queen-7197
09/25/2023, 10:25 PM22:22:15.40 [INFO] Completed: Parsing imports for workflows-explorer/src/frontend/main.js.
22:22:15.40 [WARN] Javascript source import parser failed for 'workflows-explorer/src/frontend/main.js'. This is most likely due to an unrecoverable syntax error, such as redefining module imports.
22:22:15.40 [WARN] SyntaxError: This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript". (5:16)
at instantiate (/tmp/pants-sandbox-GZSaHJ/node_modules/@babel/parser/lib/index.js:64:32)
at constructor (/tmp/pants-sandbox-GZSaHJ/node_modules/@babel/parser/lib/index.js:364:12)
at Parser.raise (/tmp/pants-sandbox-GZSaHJ/node_modules/@babel/parser/lib/index.js:3253:19)
at Parser.expectOnePlugin (/tmp/pants-sandbox-GZSaHJ/node_modules/@babel/parser/lib/index.js:3299:18)
at Parser.parseExprAtom (/tmp/pants-sandbox-GZSaHJ/node_modules/@babel/parser/lib/index.js:11209:18)
at Parser.parseExprSubscripts (/tmp/pants-sandbox-GZSaHJ/node_modules/@babel/parser/lib/index.js:10859:23)
at Parser.parseUpdate (/tmp/pants-sandbox-GZSaHJ/node_modules/@babel/parser/lib/index.js:10842:21)
at Parser.parseMaybeUnary (/tmp/pants-sandbox-GZSaHJ/node_modules/@babel/parser/lib/index.js:10818:23)
at Parser.parseMaybeUnaryOrPrivate (/tmp/pants-sandbox-GZSaHJ/node_modules/@babel/parser/lib/index.js:10656:61)
at Parser.parseExprOps (/tmp/pants-sandbox-GZSaHJ/node_modules/@babel/parser/lib/index.js:10661:23) {
code: 'BABEL_PARSER_SYNTAX_ERROR',
reasonCode: 'MissingOneOfPlugins',
loc: Position { line: 5, column: 16, index: 103 },
pos: [Getter/Setter],
missingPlugin: [Getter/Setter]
}
when I try to package. Can I configure pants so I can use "import" statements rather than things like const dep = require("./dep.js");
?*silly-queen-7197
09/25/2023, 10:43 PM"type": "module"
in my package.json
?silly-queen-7197
09/25/2023, 10:46 PMmjs
as well as cjs
. If I run webpack outside of pants it apepars to work.silly-queen-7197
09/25/2023, 10:47 PMsilly-queen-7197
09/25/2023, 11:34 PMENOENT: no such file or directory, open '/tmp/pants-sandbox-AB3lOZ/package.json
(even after stashing all my changes and going back to a known working point)silly-queen-7197
09/25/2023, 11:35 PM/tmp/pants-sandbox-AB3lOZ/workflows-explorer/
silly-queen-7197
09/25/2023, 11:40 PMpackage_json(
name="package_json",
source="package.json",
scripts=[
node_build_script(
entry_point="build",
output_directories=["artifacts"],
)
],
dependencies=[
":webpack_config",
],
)
is in workflows-exlporer/BUILD
silly-queen-7197
09/25/2023, 11:53 PMpackage_json(
name="package_json",
source="package.json",
scripts=[
node_build_script(
entry_point="build",
output_directories=["workflows-explorer/artifacts/"],
)
],
dependencies=[
"workflows-explorer:webpack_config",
],
)
I can see /tmp/pants-sandbox-VbV7N6/workflows-explorer/artifacts/
is populated but nothing is written to dist
silly-queen-7197
09/26/2023, 3:15 AMpants run :package_json
and not pants package :package_json
.silly-queen-7197
09/26/2023, 3:56 AMhappy-kitchen-89482
09/26/2023, 5:01 AMfresh-cat-90827
09/26/2023, 7:36 AM