jaegertracing / jaeger-ui

Web UI for Jaeger
http://jaegertracing.io/
Apache License 2.0
1.14k stars 483 forks source link

Yarn install fails with "Cannot find module '@babel/preset-env'" #345

Closed objectiser closed 5 years ago

objectiser commented 5 years ago

Following the Running the application instructions in the readme results in the following error:

$ yarn install
yarn install v1.10.1
[1/4] Resolving packages...
success Already up-to-date.
$ lerna run --stream --sort prepublishOnly
lerna notice cli v3.13.0
lerna info versioning independent
lerna info Executing command in 1 package: "yarn run prepublishOnly"
@jaegertracing/plexus: yarn run v1.10.1
@jaegertracing/plexus: $ webpack --mode production
@jaegertracing/plexus: An error occurred when loading the Neutrino configuration.
@jaegertracing/plexus: { Error: Cannot find module '@babel/preset-env' from '/home/gbrown/repositories/jaegertracing/jaeger-ui/packages/plexus'
@jaegertracing/plexus:     at Function.module.exports [as sync] (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/resolve/lib/sync.js:58:15)
@jaegertracing/plexus:     at resolveStandardizedName (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/babel-merge/node_modules/@babel/core/lib/config/files/plugins.js:101:31)
@jaegertracing/plexus:     at resolvePreset (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/babel-merge/node_modules/@babel/core/lib/config/files/plugins.js:58:10)
@jaegertracing/plexus:     at reduce (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/babel-merge/dist/index.js:21:26)
@jaegertracing/plexus:     at Array.reduce (<anonymous>)
@jaegertracing/plexus:     at mergeArray (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/babel-merge/dist/index.js:20:36)
@jaegertracing/plexus:     at babelMerge (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/babel-merge/dist/index.js:41:19)
@jaegertracing/plexus:     at module.exports (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/@neutrinojs/react/index.js:18:12)
@jaegertracing/plexus:     at Neutrino.use (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/neutrino/Neutrino.js:211:7)
@jaegertracing/plexus:     at neutrino.config.when (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/@neutrinojs/react-components/index.js:55:16)
@jaegertracing/plexus:     at module.exports.when (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/webpack-chain/src/ChainedMap.js:146:7)
@jaegertracing/plexus:     at module.exports (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/@neutrinojs/react-components/index.js:30:19)
@jaegertracing/plexus:     at Neutrino.use (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/neutrino/Neutrino.js:211:7)
@jaegertracing/plexus:     at Neutrino.use (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/neutrino/Neutrino.js:216:12)
@jaegertracing/plexus:     at Neutrino.use (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/neutrino/Neutrino.js:220:12)
@jaegertracing/plexus:     at module.exports.neutrino (/home/gbrown/repositories/jaegertracing/jaeger-ui/packages/plexus/.neutrinorc.js:18:12)
@jaegertracing/plexus:     at Neutrino.use (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/neutrino/Neutrino.js:211:7)
@jaegertracing/plexus:     at Neutrino.use (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/neutrino/Neutrino.js:216:12)
@jaegertracing/plexus:     at middleware.use.map.usage (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/neutrino/Neutrino.js:236:44)
@jaegertracing/plexus:     at Array.map (<anonymous>)
@jaegertracing/plexus:     at Neutrino.use (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/neutrino/Neutrino.js:236:26)
@jaegertracing/plexus:     at module.exports (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/neutrino/index.js:36:16)
@jaegertracing/plexus:     at Object.<anonymous> (/home/gbrown/repositories/jaegertracing/jaeger-ui/packages/plexus/webpack.config.js:19:16)
@jaegertracing/plexus:     at Module._compile (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
@jaegertracing/plexus:     at Object.Module._extensions..js (module.js:664:10)
@jaegertracing/plexus:     at Module.load (module.js:566:32)
@jaegertracing/plexus:     at tryModuleLoad (module.js:506:12)
@jaegertracing/plexus:     at Function.Module._load (module.js:498:3)
@jaegertracing/plexus:     at Module.require (module.js:597:17)
@jaegertracing/plexus:     at require (/home/gbrown/repositories/jaegertracing/jaeger-ui/node_modules/v8-compile-cache/v8-compile-cache.js:159:20) code: 'MODULE_NOT_FOUND' }
@jaegertracing/plexus: error Command failed with exit code 1.
@jaegertracing/plexus: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run prepublishOnly exited 1 in '@jaegertracing/plexus'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
objectiser commented 5 years ago

I can build https://github.com/jaegertracing/jaeger-ui/commit/caf91a7aabca44de924e306ab458928bc7c60f04 successfully using the same steps, so looks like the problem was introduced with the TypeScript change (https://github.com/jaegertracing/jaeger-ui/commit/2a179bfb1a35bbf2d8f301ac8e2cf29a256d6667).

objectiser commented 5 years ago

cc @tiffon

aljesusg commented 5 years ago

Tested and works it seems something wrong in your environment

$ lerna run --stream --sort prepublishOnly
lerna notice cli v3.13.0
lerna info versioning independent
lerna info Executing command in 1 package: "yarn run prepublishOnly"
@jaegertracing/plexus: yarn run v1.13.0
@jaegertracing/plexus: $ webpack --mode production
@jaegertracing/plexus: Hash: b9c487bbfa81e2b74f7e
@jaegertracing/plexus: Version: webpack 4.29.5
@jaegertracing/plexus: Child
@jaegertracing/plexus:     Hash: b9c487bbfa81e2b74f7e
@jaegertracing/plexus:     Time: 64510ms
@jaegertracing/plexus:     Built at: 03/11/2019 12:46:26 PM
@jaegertracing/plexus:                    Asset      Size  Chunks                    Chunk Names
@jaegertracing/plexus:                 index.js  2.06 MiB       0  [emitted]  [big]  index
@jaegertracing/plexus:             index.js.map  2.29 MiB       0  [emitted]         index
@jaegertracing/plexus:     layout.worker.js.map   5.2 MiB          [emitted]         
@jaegertracing/plexus:     
@jaegertracing/plexus:     WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
@jaegertracing/plexus:     This can impact web performance.
@jaegertracing/plexus:     Assets: 
@jaegertracing/plexus:       index.js (2.06 MiB)
@jaegertracing/plexus:     
@jaegertracing/plexus:     WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
@jaegertracing/plexus:     Entrypoints:
@jaegertracing/plexus:       index (2.06 MiB)
@jaegertracing/plexus:           index.js
@jaegertracing/plexus:     
@jaegertracing/plexus:     
@jaegertracing/plexus:     WARNING in webpack performance recommendations: 
@jaegertracing/plexus:     You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
@jaegertracing/plexus:     For more info visit https://webpack.js.org/guides/code-splitting/
@jaegertracing/plexus: Done in 66.19s.
lerna success run Ran npm script 'prepublishOnly' in 1 package in 66.5s:
lerna success - @jaegertracing/plexus
Done in 137.33s.
objectiser commented 5 years ago

@aljesusg Thanks, after clearing out the node_modules based on your suggestion, yarn install worked.