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

(Build fix) babel-preset-es2015 updates #572

Merged
merged 1 commit into from
Feb 14, 2017

Conversation

toddtarsi
Copy link
Contributor

@toddtarsi toddtarsi commented Feb 10, 2017

When attempting to test locally, I found I could not build on my system.
The command that would fail was npm run build:es.
This was the error I got:


resolve failed:  { Error: Cannot find module 'q-io'
    at Function.Module._resolveFilename (module.js:438:15)
    at Function.requireRelative.resolve (/Users/Eplata/react-virtualized/node_modules/require-relative/index.js:30:17)
    at resolve (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:25:26)
    at findAndRemove (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:67:11)
    at /Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:111:13
    at Array.map (native)
    at loadPreset (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:103:29)
    at module.exports (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/index.js:97:19)
    at Object.<anonymous> (/Users/Eplata/react-virtualized/node_modules/babel-preset-es2015-rollup/index.js:3:18)
    at Module._compile (module.js:541:32) code: 'MODULE_NOT_FOUND' } q-io
node_modules/nan
resolve failed:  { Error: Cannot find module 'collections'
    at Function.Module._resolveFilename (module.js:438:15)
    at Function.requireRelative.resolve (/Users/Eplata/react-virtualized/node_modules/require-relative/index.js:30:17)
    at resolve (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:25:26)
    at findAndRemove (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:67:11)
    at /Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:111:13
    at Array.map (native)
    at loadPreset (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:103:29)
    at module.exports (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/index.js:97:19)
    at Object.<anonymous> (/Users/Eplata/react-virtualized/node_modules/babel-preset-es2015-rollup/index.js:3:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19) code: 'MODULE_NOT_FOUND' } collections
resolve failed:  { Error: Cannot find module 'caniuse-db'
    at Function.Module._resolveFilename (module.js:438:15)
    at Function.requireRelative.resolve (/Users/Eplata/react-virtualized/node_modules/require-relative/index.js:30:17)
    at resolve (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:25:26)
    at findAndRemove (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:67:11)
    at /Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:111:13
    at Array.map (native)
    at loadPreset (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:103:29)
    at module.exports (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/index.js:97:19)
    at Object.<anonymous> (/Users/Eplata/react-virtualized/node_modules/babel-preset-es2015-rollup/index.js:3:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19) code: 'MODULE_NOT_FOUND' } caniuse-db
resolve failed:  { Error: Cannot find module 'babel-runtime'
    at Function.Module._resolveFilename (module.js:438:15)
    at Function.requireRelative.resolve (/Users/Eplata/react-virtualized/node_modules/require-relative/index.js:30:17)
    at resolve (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:25:26)
    at findAndRemove (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:67:11)
    at /Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:111:13
    at Array.map (native)
    at loadPreset (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:103:29)
    at module.exports (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/index.js:97:19)
    at Object.<anonymous> (/Users/Eplata/react-virtualized/node_modules/babel-preset-es2015-rollup/index.js:3:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19) code: 'MODULE_NOT_FOUND' } babel-runtime
resolve failed:  { Error: Cannot find module 'webpack-core'
    at Function.Module._resolveFilename (module.js:438:15)
    at Function.requireRelative.resolve (/Users/Eplata/react-virtualized/node_modules/require-relative/index.js:30:17)
    at resolve (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:25:26)
    at findAndRemove (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:67:11)
    at /Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:111:13
    at Array.map (native)
    at loadPreset (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/lib/serialize.js:103:29)
    at module.exports (/Users/Eplata/react-virtualized/node_modules/modify-babel-preset/index.js:97:19)
    at Object.<anonymous> (/Users/Eplata/react-virtualized/node_modules/babel-preset-es2015-rollup/index.js:3:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19) code: 'MODULE_NOT_FOUND' } webpack-core

While googling some of the keywords on traces, I found this group of stack traces:
developit/preact-boilerplate#89

I basically followed their advice, nothing, and then tried updating these dependencies. That seemed to do it.

Please let me know if you have any thoughts / differences in your experiences.
Thanks again for the excellent repo, and if you'd like any other feedback, let me know!

Node: v6.0.0
Npm: 4.2.0
OS: MacOS Sierra 10.12.1

@bvaughn
Copy link
Owner

bvaughn commented Feb 10, 2017

Hey @toddtarsi,

Thanks for submitting a patch! That's awesome.

For the dependency bump- I wonder if you would also be willing to update the yarn.lock so that it and package.json stay in sync?

I'm not sure I understand why the "loose" mode change is included with this PR. Could you clarify? I'm a little wary of this as it may impact the generated code in unknown ways.

@toddtarsi
Copy link
Contributor Author

toddtarsi commented Feb 10, 2017 via email

@bvaughn
Copy link
Owner

bvaughn commented Feb 10, 2017

I'd be much more comfortable with changing only the deps versions :)

@toddtarsi toddtarsi force-pushed the resolve-build-issues branch from 052135f to 150e6b6 Compare February 10, 2017 22:42
@toddtarsi
Copy link
Contributor Author

There! Rebased accordingly. Thanks for the rapid feedback 😄

@bvaughn
Copy link
Owner

bvaughn commented Feb 10, 2017

No problem. But would you also be willing to update the yarn.lock so that it and package.json stay in sync?

@toddtarsi toddtarsi force-pushed the resolve-build-issues branch from 150e6b6 to 5616e5b Compare February 10, 2017 22:55
@toddtarsi
Copy link
Contributor Author

Okay, rebased again! Sorry about that, I haven't used yarn before.

@toddtarsi
Copy link
Contributor Author

I just used two commands:

yarn upgrade babel-prefix-es2015@6.22.0
yarn upgrade babel-prefix-es2015-rollup@3.0.0

@bvaughn
Copy link
Owner

bvaughn commented Feb 10, 2017

No problem. That looks right to me. 😄

@bvaughn
Copy link
Owner

bvaughn commented Feb 14, 2017

Did a fresh install and confirmed the error you mentioned above. Ran the following upgrade command and confirmed that the error was resolved:

yarn upgrade babel-preset-es2015@6.22.0
yarn upgrade babel-preset-es2015-rollup@3.0.0

Thanks so much for taking the time to put this PR together!

@bvaughn bvaughn merged commit eedbe2b into bvaughn:master Feb 14, 2017
@toddtarsi
Copy link
Contributor Author

Thanks so much for sharing the great repo! 👍

@bvaughn
Copy link
Owner

bvaughn commented Feb 18, 2017

Thanks again for this fix 😁 I ran into the same problem with react-presents and redux-search and was able to just apply the same technique as you did here without wasting any time on it.

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

Successfully merging this pull request may close these issues.

2 participants