TypeError: Cannot read property 'canCompile' of undefined
See original GitHub issueHey there, tried babelify
and it didn’t work. Installed according to the readme instructions but something breaks, I have no idea why.
alessio: /home/alessio/www/ftplrs git:master
→ npm install babelify @babel/core
npm WARN ftplrs@1.0.0 No description
npm WARN ftplrs@1.0.0 No repository field.
+ babelify@8.0.0
+ @babel/core@7.1.2
updated 2 packages in 1.388s
alessio: /home/alessio/www/ftplrs git:master
→ npm i @babel/preset-env
npm WARN ftplrs@1.0.0 No description
npm WARN ftplrs@1.0.0 No repository field.
+ @babel/preset-env@7.1.0
updated 1 package in 3.672s
alessio: /home/alessio/www/ftplrs git:master
→ browserify index.js -t [ babelify --presets [ @babel/preset-env ] ]
/home/alessio/www/ftplrs/node_modules/babelify/index.js:65
if (!babel.util.canCompile(filename, extensions)) {
^
TypeError: Cannot read property 'canCompile' of undefined
at /home/alessio/www/ftplrs/node_modules/babelify/index.js:65:21
at Babelify (/home/alessio/www/ftplrs/node_modules/babelify/index.js:10:36)
at nr (/home/alessio/.nvm/versions/node/v8.9.2/lib/node_modules/browserify/node_modules/module-deps/index.js:311:23)
at onfile (/home/alessio/.nvm/versions/node/v8.9.2/lib/node_modules/browserify/node_modules/resolve/lib/async.js:59:21)
at onex (/home/alessio/.nvm/versions/node/v8.9.2/lib/node_modules/browserify/node_modules/resolve/lib/async.js:107:32)
at /home/alessio/.nvm/versions/node/v8.9.2/lib/node_modules/browserify/node_modules/resolve/lib/async.js:10:20
at FSReqWrap.oncomplete (fs.js:153:5)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
JavaScript babel "TypeError: Cannot read property 'bindings ...
This is caused by a mismatch of babel dependencies between 6 & 7. You currently seem to have both installed. Try removing babel-core ......
Read more >Gsap + Typescript + Browserify + Babelify Compilation Not ...
It seems to be a babelify issue, that can't transform GSAP ... getting this error: "TypeError: Cannot read property 'arrayify' of undefined".
Read more >Wasm / Shaun Lebron - Observable
NOTE: Modify the code by clicking the module names on the left. RuntimeError: Cannot read properties of undefined (reading 'ready'). viewof adderModule = ......
Read more >sc-forks/solidity-coverage - Gitter
Event trace could not be read. Error: ENOENT: no such file or directory, open './allFiredEvents'. How can I fix this? Stef Heyenrath.
Read more >@angular-architects/module-federation - npm
Set it to one of the following values to get a more streamlined ... Cannot read property 'ɵcmp' of undefined TypeError: Cannot read...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks bro, my issue was install outdated packages that Typescipt Gulp Tutorial suggest to install. At the end, i was working with babelify@8, and babel ^7.5.5, and they aren’t compatible. So i’ve installed babelify@10 and everything worked well.
@geanfrancovolpe thank you so much for the solution! I was messing around from an hour already and nothing was working then I’ve updated to babelify@10 as you said and it worked! Cheers 😄