Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Axios >=1.0 #1749

Closed
zhanwenchen opened this issue Feb 20, 2023 · 0 comments
Closed

Problem with Axios >=1.0 #1749

zhanwenchen opened this issue Feb 20, 2023 · 0 comments

Comments

@zhanwenchen
Copy link
Contributor

I was able to solve this issue by changing the devDependency gitly to <=2.2, because gitly 2.3 depends on axios >= 1.0 and thus it will throw this ECMAScript vs Babel error about

(base) zhanwen@zhanwen-rise:~/Downloads/linter$ apm i .
Installing modules ✗
> [email protected] postinstall /home/zhanwen/Downloads/linter/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> [email protected] prepare /home/zhanwen/Downloads/linter
> npm run get.ui-types && npm run clean && npm run build


> [email protected] get.ui-types /home/zhanwen/Downloads/linter
> node ./scripts/get-ui-types.js


npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
/home/zhanwen/Downloads/linter/node_modules/gitly/node_modules/axios/index.js:1
import axios from './lib/axios.js';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Module._compile (internal/modules/cjs/loader.js:891:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/zhanwen/Downloads/linter/node_modules/gitly/lib/utils/fetch.js:29:33)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] get.ui-types: `node ./scripts/get-ui-types.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] get.ui-types script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zhanwen/.atom/.apm/_logs/2023-02-20T04_55_44_829Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepare: `npm run get.ui-types && npm run clean && npm run build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zhanwen/.atom/.apm/_logs/2023-02-20T04_55_44_857Z-debug.log
@aminya aminya closed this as completed in efc4f15 Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant