question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoMethodError: undefined method `start_with?' for nil:NilClass

See original GitHub issue

NoMethodError: undefined method `start_with?’ for nil:NilClass

My setup:

ruby 2.4.2p198
rails-5.1.6
uglifier-4.1.11
therubyracer-0.12.3

Error raised during deployment. Recently I’ve added @ckeditor/ckeditor5-build-classic npm package which contains ES6 syntax.

# also I've changed
config.assets.js_compressor = :uglifier
# to
config.assets.js_compressor = Uglifier.new(harmony: true)

Now I’m getting this error. Here is capistrano log

Reproduction:

Uglifier.compile(File.read("node_modules/@ckeditor/ckeditor5-build-classic/build/ckeditor.js"), harmony: true)
> NoMethodError: undefined method `start_with?' for nil:NilClass

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:11
  • Comments:13

github_iconTop GitHub Comments

34reactions
phlcastrocommented, Aug 3, 2018

Using the options bellow did the tricky to me. No idea why though ¯\(°_o)/¯

Uglifier.new(harmony: true, compress: { unused: false })

Read more comments on GitHub >

github_iconTop Results From Across the Web

ruby - Why am I getting NoMethodError undefined method for nil
Here @board is an instance variable. Instance variables belong to an object (instance), hence why they are called instance variables.
Read more >
NoMethodError: undefined method for nil:NilClass... Explained
This is a common Ruby error which indicates that the method or attribute for an object you are trying to call on an...
Read more >
[solved] include? problem (undefined method `include?' for nil ...
' for nil:NilClass (NoMethodError)”. I've come up with 2 solutions to fix the error below; 1st Solution-MY CODE-. print “What's your name?” user_input ......
Read more >
NoMethodError (undefined method `inner_html' for nil ...
Updating a category topic fails with the message «NoMethodError (undefined method `inner_html' for nil:NilClass)» when the topic's contents ...
Read more >
Undefined method 'header' for nil:NilClass · Issue #128 - GitHub
I tried to install and run TenderJIT but it won't start with following error upon rake compile: /usr/bin/ruby -I lib ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found