Comments (9)
One more --no-browser-globals
issue from my app: my entry point script has a shebang as its first line, which causes additional confusion:
Thanks for reaching out and offering to help, btw! Devtool looks super promising.
from devtool.
@rgrove I can't seem to reproduce the shebang parse error. Can you add any details here? #30
from devtool.
@rgrove
I've made some fixes to the following:
- Fixing the misleading syntax error reporting upstream (waiting on the PR to be merged)
- Fixing an issue with Bluebird when using
--no-bg
(which is part of the second issue you reported) - Fixing the original issue in this thread which was caused by
self
which should be undefined in Node
Can you test again with [email protected]
?
from devtool.
@mattdesl 1.7.1 gets further, and the shebang parse error is gone now! Still getting lots of SyntaxError: Unexpected end of input
errors though, and after a bunch of these my app finally crashes since it can't properly initialize itself.
When I look at the files that are causing the errors, the one thing that stands out is that none of them end with a newline. I added an ending newline to one of them and, sure enough, the SyntaxError disappeared.
Here's the latest console output, in case it helps:
Error compiling module: /Users/rgrove/src/cake/www/node_modules/core-js/library/modules/$.global.js
Unexpected end of input
SyntaxError: Unexpected end of input
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:404:25)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/core-js/library/modules/$.export.js:1:131)
at Module._compile (module.js:425:26)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/core-js/library/modules/$.iter-define.js:3:22)
at Module._compile (module.js:425:26)
Error compiling module: /Users/rgrove/src/cake/www/node_modules/core-js/library/modules/$.core.js
Unexpected end of input
SyntaxError: Unexpected end of input
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:404:25)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/core-js/library/modules/$.export.js:2:17)
at Module._compile (module.js:425:26)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/core-js/library/modules/$.iter-define.js:3:22)
at Module._compile (module.js:425:26)
Error compiling module: /Users/rgrove/src/cake/www/node_modules/babel-core/node_modules/babel-traverse/lib/path/constants.js
Unexpected end of input
SyntaxError: Unexpected end of input
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:404:25)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/babel-core/node_modules/babel-traverse/lib/path/index.js:21:18)
at Module._compile (module.js:425:26)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/babel-core/node_modules/babel-traverse/lib/context.js:13:13)
at Module._compile (module.js:425:26)
Error compiling module: /Users/rgrove/src/cake/www/node_modules/babel-traverse/lib/path/constants.js
Unexpected end of input
SyntaxError: Unexpected end of input
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:404:25)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/babel-traverse/lib/path/index.js:21:18)
at Module._compile (module.js:425:26)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/babel-traverse/lib/context.js:13:13)
at Module._compile (module.js:425:26)
Error compiling module: /Users/rgrove/src/cake/www/node_modules/babylon/lib/tokenizer/state.js
Unexpected end of input
SyntaxError: Unexpected end of input
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:404:25)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/babylon/lib/tokenizer/index.js:19:14)
at Module._compile (module.js:425:26)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/babylon/lib/parser/index.js:19:18)
at Module._compile (module.js:425:26)
Error compiling module: /Users/rgrove/src/cake/www/node_modules/babel-generator/node_modules/babel-traverse/lib/path/constants.js
Unexpected end of input
SyntaxError: Unexpected end of input
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:404:25)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/babel-generator/node_modules/babel-traverse/lib/path/index.js:21:18)
at Module._compile (module.js:425:26)
at Object.devtoolCompileModule [as .js] (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/rgrove/src/cake/www/node_modules/babel-generator/node_modules/babel-traverse/lib/context.js:13:13)
at Module._compile (module.js:425:26)
Error compiling module: /Users/rgrove/src/cake/www/node_modules/babel-helper-builder-react-jsx/lib/index.js
Unexpected end of input
SyntaxError: Unexpected end of input
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:404:25)
at devtoolCompileModule (/usr/local/lib/node_modules/devtool/lib/require-hook.js:37:14)
at Object.require.extensions.(anonymous function) [as .js] (/Users/rgrove/src/cake/www/node_modules/babel-register/lib/node.js:138:7)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at exports.default (/Users/rgrove/src/cake/www/node_modules/babel-plugin-transform-react-jsx/lib/index.js:12:17)
at Function.memoisePluginContainer (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:127:13)
at Function.normalisePlugin (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:161:32)
at /Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:197:30
at Array.map (native)
at Function.normalisePlugins (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:173:20)
at OptionManager.mergeOptions (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:271:36)
at OptionManager.mergePresets (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:325:16)
TypeError: require(...) is not a function
at exports.default (/Users/rgrove/src/cake/www/node_modules/babel-plugin-transform-react-jsx/lib/index.js:12:58)
at Function.memoisePluginContainer (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:127:13)
at Function.normalisePlugin (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:161:32)
at /Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:197:30
at Array.map (native)
at Function.normalisePlugins (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:173:20)
at OptionManager.mergeOptions (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:271:36)
at OptionManager.mergePresets (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:325:16)
at OptionManager.mergeOptions (/Users/rgrove/src/cake/www/node_modules/babel-core/lib/transformation/file/options/option-manager.js:287:12)
at compile (/Users/rgrove/src/cake/www/node_modules/babel-register/lib/node.js:85:15)
at loader (/Users/rgrove/src/cake/www/node_modules/babel-register/lib/node.js:130:14)
at Object.require.extensions.(anonymous function) [as .js] (/Users/rgrove/src/cake/www/node_modules/babel-register/lib/node.js:140:7)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
from devtool.
Ok, I managed to get this universal webpack boilerplate running/debugging inside devtool
with a few more tweaks (see 1.7.2
). I think we will have to keep testing on real-world apps to track down any more problems.
I will probably need some isolated test to fix the above bugs since it isn't clear where the problem is.
Thanks again!
from devtool.
Update: the "Unexpected end of input" was just a silly typo on the way I was wrapping modules in a closure (forgot a new line). So at least now that bug is fixed in 1.7.3.
from devtool.
Hooray! As of 1.7.3, devtool runs my app perfectly. Thanks for all the help, @mattdesl!
from devtool.
Awesome! I am going to close this. I'm sure something else will come up eventually, feel free to post a new issue when/if it breaks. 😄
from devtool.
hi @mattdesl I have react/webpack project, and use tape for testing. Testing works great with tape, but sometimes I really needed devtool to trace error. Do you think it is possible to use it with above stack. An example with any of the react boiler plates out there would be awesome. thanks a ton for your help.
from devtool.
Related Issues (20)
- Module version mismatch. Expected 50, got 51. HOT 5
- Fails on save when using mongoose 4.x with sub-documents
- Require hook for ts-node doesn't work HOT 3
- V8 flag `--expose-gc` causes whole config to silently fail
- Reload console on file change with --watch
- Windows 10: File /npm/node_modules/devtool/index.html not found HOT 1
- Add flag to disable process.exit() HOT 1
- impossible to inspect http requests
- Devtool Chrome debugger cannot find prototype closure functions
- Ignore files when using --watch HOT 5
- Devtools doesn't work with dynamic link libraries
- REPL :: On windows (10) i can't require modules from current working directory HOT 1
- Can you add docs on how to use this with jest? HOT 1
- Support more flags in devtoolrc
- install error HOT 1
- add support async/await HOT 3
- please update new electron version
- Unable to install
- devtool with expressjs, how to find script files?
- devtool/bin/spawn replacement in Node/DevTool? Looking for advice ... HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devtool.