mulesoft-labs / api-console-cli

A CLI tools for the API console.
Other
14 stars 15 forks source link

error: Command failed: node_modules/.bin/rollup -c rollup.config.js #51

Open eyoboue opened 3 years ago

eyoboue commented 3 years ago

Hello, I still have the same error

~ node -v
v12.15.0
~ yarn --version
1.22.10
~ npm --version
6.13.4
─ api-console-cli@3.0.0
└─ api-console@6.4.9
api-console build -a ./resources/raml/api.raml -t 'RAML 1.0' -o ./api-console --strict --no-cache
cross-env NODE_ENV=development yarn run build-console && nodemon ./index.js --watch
$ yarn run api-console build -a ./resources/raml/api.raml -t 'RAML 1.0' -o ./api-console --no-cache
$ ./node_modules/.bin/api-console build -a ./resources/raml/api.raml -t 'RAML 1.0' -o ./api-console --no-cache
warn: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN lifecycle The node binary used for scripts is /var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/yarn--1619698658201-0.610891915831224/node but npm is using /Users/eyoboue/.nvm/versions/node/v12.15.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
npm notice created a lockfile as package-lock.json. You should commit this file.

warn: npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated @advanced-rest-client/multipart-payload-editor@4.1.0: This element is deprecated. Use @advanced-rest-client/body-editor instead.
npm WARN deprecated @advanced-rest-client/files-payload-editor@3.1.0: This element is deprecated. Use @advanced-rest-client/body-editor instead.
npm WARN deprecated @advanced-rest-client/payload-parser-mixin@3.0.0: This element is deprecated. Use @advanced-rest-client/body-editor instead.
npm WARN lifecycle The node binary used for scripts is /var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/yarn--1619698658201-0.610891915831224/node but npm is using /Users/eyoboue/.nvm/versions/node/v12.15.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
npm WARN @advanced-rest-client/arc-icons@3.3.3 requires a peer of @polymer/iron-icon@^3.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN @advanced-rest-client/arc-icons@3.3.3 requires a peer of @polymer/iron-iconset-svg@^3.0.1 but none is installed. You must install peer dependencies yourself.

error:
error: Command failed: node_modules/.bin/rollup -c rollup.config.js
[!] Error: While loading the Rollup configuration from "rollup.config.js", Node tried to require an ES module from a CommonJS file, which is not supported. A common cause is if there is a package.json file with "type": "module" in the same folder. You can try to fix this by changing the extension of your configuration file to ".cjs" or ".mjs" depending on the content, which will prevent Rollup from trying to preprocess the file but rather hand it to Node directly.
https://rollupjs.org/guide/en/#using-untranspiled-config-files
Error: While loading the Rollup configuration from "rollup.config.js", Node tried to require an ES module from a CommonJS file, which is not supported. A common cause is if there is a package.json file with "type": "module" in the same folder. You can try to fix this by changing the extension of your configuration file to ".cjs" or ".mjs" depending on the content, which will prevent Rollup from trying to preprocess the file but rather hand it to Node directly.
    at Object.error (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/shared/rollup.js:5305:30)
    at loadConfigFromBundledFile (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/shared/loadConfigFile.js:554:27)
    at getDefaultFromTranspiledConfigFile (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/shared/loadConfigFile.js:532:12)
    at loadConfigFile (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/shared/loadConfigFile.js:497:15)
    at Object.loadAndParseConfigFile (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/shared/loadConfigFile.js:476:21)
    at getConfigs (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/bin/rollup:1685:39)
    at runRollup (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/bin/rollup:1659:43)

error: Error: Command failed: node_modules/.bin/rollup -c rollup.config.js
[!] Error: While loading the Rollup configuration from "rollup.config.js", Node tried to require an ES module from a CommonJS file, which is not supported. A common cause is if there is a package.json file with "type": "module" in the same folder. You can try to fix this by changing the extension of your configuration file to ".cjs" or ".mjs" depending on the content, which will prevent Rollup from trying to preprocess the file but rather hand it to Node directly.
https://rollupjs.org/guide/en/#using-untranspiled-config-files
Error: While loading the Rollup configuration from "rollup.config.js", Node tried to require an ES module from a CommonJS file, which is not supported. A common cause is if there is a package.json file with "type": "module" in the same folder. You can try to fix this by changing the extension of your configuration file to ".cjs" or ".mjs" depending on the content, which will prevent Rollup from trying to preprocess the file but rather hand it to Node directly.
    at Object.error (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/shared/rollup.js:5305:30)
    at loadConfigFromBundledFile (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/shared/loadConfigFile.js:554:27)
    at getDefaultFromTranspiledConfigFile (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/shared/loadConfigFile.js:532:12)
    at loadConfigFile (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/shared/loadConfigFile.js:497:15)
    at Object.loadAndParseConfigFile (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/shared/loadConfigFile.js:476:21)
    at getConfigs (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/bin/rollup:1685:39)
    at runRollup (/private/var/folders/95/qm8j4v3x72j8b5yr_np35m680000gn/T/tmp-62164-Q3S8R75ck75q/node_modules/rollup/dist/bin/rollup:1659:43)

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:223:5)
    at ChildProcess.EventEmitter.emit (domain.js:475:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
error:
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/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
jarrodek commented 3 years ago

@TwoPlusTwoOne could you take a look into this, please?