-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Replies: 1 comment · 8 replies
-
Sorry to hear that, what's your node version? |
Beta Was this translation helpful? Give feedback.
All reactions
-
The primary issue from the error seems to be the import error. " Cannot use import statement outside a module" in the @spectrum-icons. |
Beta Was this translation helpful? Give feedback.
All reactions
-
for some reason it looks like babel-node isn't getting used, node shouldn't be seeing those as import statements I don't see babel-cli (which contains babel-node) as an explicit dependency in our repo, could you see if you have it installed? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Here is the full console output: [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "[object Array]".] { Node.js v18.16.0 |
Beta Was this translation helpful? Give feedback.
All reactions
-
Working now. I don't know for some reason it does not work on Windows, using wsl it worked. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm trying to set up the project on my Windows system, but it throws an error while executing the command
yarn install
throws an error.I don't know if I'm missing something here.
yarn version:1.22.19
[4/4] Building fresh packages...
$ yarn build:icons && patch-package
yarn run v1.22.19
$ babel-node --presets @babel/env ./scripts/buildIcons.js
$ babel-node --extensions '.cjs,.js' --presets @babel/env ./scripts/generateIcons.cjs -i '[]' && yarn generate-types
$ babel-node --extensions '.cjs,.js' --presets @babel/env ./scripts/generateIcons.cjs -i '[]' && yarn generate-types
$ babel-node --extensions '.cjs,.js' --presets @babel/env ./scripts/generateIcons.cjs -i '[]' && yarn generate-types
$ babel-node --extensions '.cjs,.js' --presets @babel/env ./scripts/generateIcons.cjs -i '[]' && yarn generate-types
[Making and building icons for @spectrum-icons/workflow] (node:15120) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
[Making and building icons for @spectrum-icons/workflow] (Use
node --trace-warnings ...
to show where the warning was created)[Making and building icons for @spectrum-icons/workflow] F:\react-spectrum\packages@spectrum-icons\workflow\scripts\generateIcons.cjs:13
[Making and building icons for @spectrum-icons/workflow] import {generateIcons} from '@spectrum-icons/build-tools/generateIcons';
[Making and building icons for @spectrum-icons/workflow] ^^^^^^
[Making and building icons for @spectrum-icons/workflow]
[Making and building icons for @spectrum-icons/workflow] SyntaxError: Cannot use import statement outside a module
[Making and building icons for @spectrum-icons/workflow] at Object.compileFunction (node:vm:352:18)
[Making and building icons for @spectrum-icons/workflow] at wrapSafe (node:internal/modules/cjs/loader:1032:15)
[Making and building icons for @spectrum-icons/workflow] at Module._compile (node:internal/modules/cjs/loader:1067:27)
[Making and building icons for @spectrum-icons/workflow] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
[Making and building icons for @spectrum-icons/workflow] at Module.load (node:internal/modules/cjs/loader:981:32)
[Making and building icons for @spectrum-icons/workflow] at Function.Module._load (node:internal/modules/cjs/loader:822:12)
[Making and building icons for @spectrum-icons/workflow] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
[Making and building icons for @spectrum-icons/workflow] at Object. (F:\react-spectrum\node_modules@babel\node\lib_babel-node.js:172:21)
[Making and building icons for @spectrum-icons/workflow] at Module._compile (node:internal/modules/cjs/loader:1103:14)
[Making and building icons for @spectrum-icons/workflow] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
[Making and building icons for @spectrum-icons/ui] (node:7812) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
[Making and building icons for @spectrum-icons/ui] (Use
node --trace-warnings ...
to show where the warning was created)[Making and building icons for @spectrum-icons/ui] F:\react-spectrum\packages@spectrum-icons\ui\scripts\generateIcons.cjs:13
[Making and building icons for @spectrum-icons/ui] import {compileSVG} from '@spectrum-icons/build-tools/compileSVG';
[Making and building icons for @spectrum-icons/ui] ^^^^^^
[Making and building icons for @spectrum-icons/ui]
[Making and building icons for @spectrum-icons/ui] SyntaxError: Cannot use import statement outside a module
[Making and building icons for @spectrum-icons/ui] at Object.compileFunction (node:vm:352:18)
[Making and building icons for @spectrum-icons/ui] at wrapSafe (node:internal/modules/cjs/loader:1032:15)
[Making and building icons for @spectrum-icons/ui] at Module._compile (node:internal/modules/cjs/loader:1067:27)
[Making and building icons for @spectrum-icons/ui] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
[Making and building icons for @spectrum-icons/ui] at Module.load (node:internal/modules/cjs/loader:981:32)
[Making and building icons for @spectrum-icons/ui] at Function.Module._load (node:internal/modules/cjs/loader:822:12)
[Making and building icons for @spectrum-icons/ui] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
[Making and building icons for @spectrum-icons/ui] at Object. (F:\react-spectrum\node_modules@babel\node\lib_babel-node.js:172:21)
[Making and building icons for @spectrum-icons/ui] at Module._compile (node:internal/modules/cjs/loader:1103:14)
[Making and building icons for @spectrum-icons/ui] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
[Making and building icons for @spectrum-icons/express] (node:6844) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
[Making and building icons for @spectrum-icons/express] (Use
node --trace-warnings ...
to show where the warning was created)[Making and building icons for @spectrum-icons/color] (node:6908) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
[Making and building icons for @spectrum-icons/color] (Use
node --trace-warnings ...
to show where the warning was created)[Making and building icons for @spectrum-icons/color] F:\react-spectrum\packages@spectrum-icons\color\scripts\generateIcons.cjs:13
[Making and building icons for @spectrum-icons/color] import {generateIcons} from '@spectrum-icons/build-tools/generateIcons';
[Making and building icons for @spectrum-icons/color] ^^^^^^
[Making and building icons for @spectrum-icons/color]
[Making and building icons for @spectrum-icons/color] SyntaxError: Cannot use import statement outside a module
[Making and building icons for @spectrum-icons/color] at Object.compileFunction (node:vm:352:18)
[Making and building icons for @spectrum-icons/color] at wrapSafe (node:internal/modules/cjs/loader:1032:15)
[Making and building icons for @spectrum-icons/color] at Module._compile (node:internal/modules/cjs/loader:1067:27)
[Making and building icons for @spectrum-icons/color] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
[Making and building icons for @spectrum-icons/color] at Module.load (node:internal/modules/cjs/loader:981:32)
[Making and building icons for @spectrum-icons/color] at Function.Module._load (node:internal/modules/cjs/loader:822:12)
[Making and building icons for @spectrum-icons/color] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
[Making and building icons for @spectrum-icons/color] at Object. (F:\react-spectrum\node_modules@babel\node\lib_babel-node.js:172:21)
[Making and building icons for @spectrum-icons/color] at Module._compile (node:internal/modules/cjs/loader:1103:14)
[Making and building icons for @spectrum-icons/color] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
[Making and building icons for @spectrum-icons/express] F:\react-spectrum\packages@spectrum-icons\express\scripts\generateIcons.cjs:13
[Making and building icons for @spectrum-icons/express] import fs from 'fs-extra';
[Making and building icons for @spectrum-icons/express] ^^^^^^
[Making and building icons for @spectrum-icons/express]
[Making and building icons for @spectrum-icons/express] SyntaxError: Cannot use import statement outside a module
[Making and building icons for @spectrum-icons/express] at Object.compileFunction (node:vm:352:18)
[Making and building icons for @spectrum-icons/express] at wrapSafe (node:internal/modules/cjs/loader:1032:15)
[Making and building icons for @spectrum-icons/express] at Module._compile (node:internal/modules/cjs/loader:1067:27)
[Making and building icons for @spectrum-icons/express] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
[Making and building icons for @spectrum-icons/express] at Module.load (node:internal/modules/cjs/loader:981:32)
[Making and building icons for @spectrum-icons/express] at Function.Module._load (node:internal/modules/cjs/loader:822:12)
[Making and building icons for @spectrum-icons/express] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
[Making and building icons for @spectrum-icons/express] at Object. (F:\react-spectrum\node_modules@babel\node\lib_babel-node.js:172:21)
[Making and building icons for @spectrum-icons/express] at Module._compile (node:internal/modules/cjs/loader:1103:14)
[Making and building icons for @spectrum-icons/express] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.um-icons/workflow]
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.um-icons/ui]
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.um-icons/express]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[Making and building icons for @spectrum-icons/ui] yarn make-icons && yarn build-icons exited with code 1
[Making and building icons for @spectrum-icons/express] yarn make-icons && yarn build-icons exited with code 1
[Making and building icons for @spectrum-icons/color] yarn make-icons && yarn build-icons exited with code 1
[Making and building icons for @spectrum-icons/workflow] yarn make-icons && yarn build-icons exited with code 1
node:internal/process/promises:265
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "[object Array]".] {
code: 'ERR_UNHANDLED_REJECTION'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Beta Was this translation helpful? Give feedback.
All reactions