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

Module build failed error #610

Closed
leplatrem opened this issue Sep 26, 2018 · 3 comments · Fixed by #614
Closed

Module build failed error #610

leplatrem opened this issue Sep 26, 2018 · 3 comments · Fixed by #614
Labels

Comments

@leplatrem
Copy link
Contributor

leplatrem commented Sep 26, 2018

(.venv) ➜  kinto-admin git:(master) ✗ rm -rf node_modules 
(.venv) ➜  kinto-admin git:(master) ✗ npm install

> [email protected] postinstall /home/mathieu/Code/Mozilla/kinto-admin/node_modules/electron
> node install.js

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1658 packages from 2160 contributors and audited 30949 packages in 54.355s
found 0 vulnerabilities

npm install succeeds.

npm run test succeeds.

npm run build succeeds.

But npm run start fails

(.venv) ➜  kinto-admin git:(master) ✗ npm run start      

> [email protected] start /home/mathieu/Code/Mozilla/kinto-admin
> NODE_ENV=development node server/dev.js

Listening at http://0.0.0.0:3000
webpack built 9ecbc46a06f0f0158a42 in 5420ms
✖ 「wdm」: Hash: 9ecbc46a06f0f0158a42
Version: webpack 4.16.2
Time: 5420ms
Built at: 09/26/2018 12:42:42 PM
    Asset      Size  Chunks  Chunk Names
bundle.js  4.18 MiB    main  main
Entrypoint main = bundle.js
[./index.js] 513 bytes {main} [built]
[./node_modules/@babel/polyfill/lib/index.js] 893 bytes {main} [built]
[./node_modules/@babel/polyfill/node_modules/regenerator-runtime/runtime.js] 23.6 KiB {main} [built]
[./node_modules/core-js/es6/index.js] 5.74 KiB {main} [built]
[./node_modules/core-js/web/index.js] 157 bytes {main} [built]
[./node_modules/react/index.js] 190 bytes {main} [built]
[./node_modules/strip-ansi/index.js] 161 bytes {main} [built]
[./node_modules/webpack-hot-middleware/client-overlay.js] (webpack)-hot-middleware/client-overlay.js 2.16 KiB {main} [built]
[./node_modules/webpack-hot-middleware/client.js] (webpack)-hot-middleware/client.js 7.59 KiB {main} [built]
[./node_modules/webpack-hot-middleware/process-update.js] (webpack)-hot-middleware/process-update.js 4.23 KiB {main} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 489 bytes {main} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {main} [built]
[0] multi @babel/polyfill webpack-hot-middleware/client ./index 52 bytes {main} [built]
[./src/index.js] 1.54 KiB {main} [built] [failed] [1 error]
[./src/plugins/signoff/index.js] 1.71 KiB {main} [built]
    + 496 hidden modules

ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed  from that module, such as 'addNamed' or 'addDefault'.
    at File.addImport (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/@babel/core/lib/transformation/file/file.js:173:11)
    at /home/mathieu/Code/Mozilla/kinto-admin/node_modules/babel-plugin-react-transform/lib/index.js:259:46
    at Array.map (<anonymous>)
    at ReactTransformBuilder.initTransformers (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/babel-plugin-react-transform/lib/index.js:257:40)
    at ReactTransformBuilder.build (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/babel-plugin-react-transform/lib/index.js:166:41)
    at PluginPass.Program (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/babel-plugin-react-transform/lib/index.js:333:17)
    at newFn (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js:193:21)
    at NodePath._call (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:88:12)
 @ ./index.js 3:0-31 12:27-37
 @ multi @babel/polyfill webpack-hot-middleware/client ./index

ERROR in ./src/plugins/signoff/components.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed  from that module, such as 'addNamed' or 'addDefault'.
    at File.addImport (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/@babel/core/lib/transformation/file/file.js:173:11)
    at /home/mathieu/Code/Mozilla/kinto-admin/node_modules/babel-plugin-react-transform/lib/index.js:259:46
    at Array.map (<anonymous>)
    at ReactTransformBuilder.initTransformers (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/babel-plugin-react-transform/lib/index.js:257:40)
    at ReactTransformBuilder.build (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/babel-plugin-react-transform/lib/index.js:166:41)
    at PluginPass.Program (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/babel-plugin-react-transform/lib/index.js:333:17)
    at newFn (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js:193:21)
    at NodePath._call (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (/home/mathieu/Code/Mozilla/kinto-admin/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:88:12)
 @ ./src/plugins/signoff/index.js 8:0-45 42:68-82
 @ ./index.js
 @ multi @babel/polyfill webpack-hot-middleware/client ./index
ℹ 「wdm」: Failed to compile.

@leplatrem leplatrem added the bug label Sep 26, 2018
@leplatrem
Copy link
Contributor Author

npm run test succeeds, that's why we may have missed it while upgrading

@leplatrem
Copy link
Contributor Author

@glasserc
Copy link
Contributor

We discussed this online. The react-transform plugin offers two features that we use:

  1. "hot module reloading"
  2. catching errors during render() calls

Both are only useful during development. I'd be OK with getting rid of the plugin for now.

Apps developed using create-react-app offer a kind of hot module reloading, implemented using https://github.com/webpack/webpack-dev-server. That feature could be postponed until someone commits to doing more maintenance on kinto-admin. Maybe it's because I'm a neckbeard, but I don't mind hitting Ctrl-C and restarting my app when I change something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants