solgraph icon indicating copy to clipboard operation
solgraph copied to clipboard

Cannot find module '@babel/preset-es2015'

Open Gaurang10 opened this issue 6 years ago • 12 comments

$ npm install --save -g solgraph npm WARN deprecated @babel/[email protected]: 👋 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

[email protected] postinstall /home/gauran/.nvm/versions/node/v8.10.0/lib/node_modules/solgraph npm run build

[email protected] 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! [email protected] build: babel -d dist src npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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: [email protected] (node_modules/solgraph/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: npm run build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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 :~$

Gaurang10 avatar Aug 06 '18 11:08 Gaurang10

Having exactly the same issue

ghost avatar Aug 06 '18 20:08 ghost

the same issue for me: MacOS X 10.12 Installation of [email protected] with success

ecouffes avatar Aug 08 '18 09:08 ecouffes

here too. (arch/manjaro here)

blueto01h avatar Aug 11 '18 13:08 blueto01h

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 avatar Aug 15 '18 03:08 jazefe

@jazefe You have to use npm install --save -g [email protected]

Gaurang10 avatar Aug 16 '18 07:08 Gaurang10

@Gaurang10 Thanks

jazefe avatar Aug 16 '18 07:08 jazefe

@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.

raineorshine avatar Aug 19 '18 16:08 raineorshine

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 :-)

jpantunes avatar Aug 19 '18 18:08 jpantunes

Fixed, thanks to @jpantunes.

Published in v0.3.3

raineorshine avatar Aug 20 '18 17:08 raineorshine

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'?

YewTreeWeb avatar Feb 15 '19 21:02 YewTreeWeb

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

jsib0 avatar Apr 25 '19 22:04 jsib0

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

raineorshine avatar May 01 '19 17:05 raineorshine

Babel upgraded and solgraph v1.0.0.0 released.

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

raineorshine avatar Dec 04 '22 14:12 raineorshine