Giter Club home page Giter Club logo

Comments (9)

rgrove avatar rgrove commented on July 21, 2024

One more --no-browser-globals issue from my app: my entry point script has a shebang as its first line, which causes additional confusion:

160126hr0og

Thanks for reaching out and offering to help, btw! Devtool looks super promising.

from devtool.

mattdesl avatar mattdesl commented on July 21, 2024

@rgrove I can't seem to reproduce the shebang parse error. Can you add any details here? #30

from devtool.

mattdesl avatar mattdesl commented on July 21, 2024

@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.

rgrove avatar rgrove commented on July 21, 2024

@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.

mattdesl avatar mattdesl commented on July 21, 2024

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.

mattdesl avatar mattdesl commented on July 21, 2024

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.

rgrove avatar rgrove commented on July 21, 2024

Hooray! As of 1.7.3, devtool runs my app perfectly. Thanks for all the help, @mattdesl!

from devtool.

mattdesl avatar mattdesl commented on July 21, 2024

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.

bsr203 avatar bsr203 commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.