raineorshine/solgraph

Cannot find module '@babel/preset-es2015'

Gaurang10 opened this issue ยท 13 comments

$ npm install --save -g solgraph
npm WARN deprecated @babel/preset-es2015@7.0.0-beta.53: ๐Ÿ‘‹ We've deprecated any official yearly presets in 6.x in favor or babel-preset-env. For 7.x it would be @babel/preset-env.
/home/gauran/.nvm/versions/node/v8.10.0/bin/solgraph -> /home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph/solgraph.js

solgraph@0.3.2 postinstall /home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph
npm run build

solgraph@0.3.2 build /home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph
babel -d dist src

{ Error: Cannot find module '@babel/preset-es2015' from '/home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph'
at Function.module.exports [as sync] (/home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph/node_modules/resolve/lib/sync.js:43:15)
at resolveStandardizedName (/home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/files/plugins.js:101:31)
at resolvePreset (/home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/files/plugins.js:58:10)
at loadPreset (/home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/files/plugins.js:77:20)
at createDescriptor (/home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:114:9)
at items.map (/home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:69:50)
at Array.map ()
at createDescriptors (/home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:69:29)
at createPresetDescriptors (/home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:61:10)
at presets (/home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:43:19) code: 'MODULE_NOT_FOUND' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! solgraph@0.3.2 build: babel -d dist src
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the solgraph@0.3.2 build 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/gauran/.npm/_logs/2018-08-06T11_09_40_157Z-debug.log
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/solgraph/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! solgraph@0.3.2 postinstall: npm run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the solgraph@0.3.2 postinstall 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/gauran/.npm/_logs/2018-08-06T11_09_40_955Z-debug.log
:~$

Having exactly the same issue

the same issue for me: MacOS X 10.12
Installation of solgraph@0.2.6 with success

here too. (arch/manjaro here)

When I install solgraph v0.3.2, it's wrong!!!
Error: Cannot find module '@babel/preset-es2015' from '/usr/local/lib/node_modules/solgraph'

So, How can I install solgraph v0.2.6 in ubuntu?
Thanks.

@jazefe You have to use npm install --save -g solgraph@0.2.6

@Gaurang10
Thanks

@jpantunes There appears to be some babel issues still after merging your PR. I deleted my node_modules and reinstalled, but could not reproduce. Any ideas why people are getting Cannot find module '@babel/preset-es2015'? It is in the dependencies after all.

I noticed that it broke in one of the latest babel updates and I've now opened a pull request that hopefully fixes the dependency hell... I'd introduced earlier :-)

Fixed, thanks to @jpantunes.

Published in v0.3.3

I'm also getting this issue. I need this module to resolve the error throw new Error('Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}');

Has there been any fix for this issue of Cannot find module '@babel/preset-es2015'?

jsib0 commented

Anyone have any updates? I'm also getting the same issue

I am not actively working on this, but I will review all issues and PR's if anyone wants to investigate.

Babel upgraded and solgraph v1.0.0.0 released.

Let me know if this is still broken and I will reopen.