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.

replace is not defined error

See original GitHub issue

I follow the guide to install sendmail and I write a simple piece of code to send a test mail. I don’t know why but I have this error:

Cannot read property 'replace' of undefined

Why? Can you help me? In the code I have all the fields: from,to,subject,text and html…

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
GreenPioneercommented, Sep 18, 2016

@Geex-Renzo im with you on your second solution. @guileen could you give me or Geex the ability to push new versions on npm ?

0reactions
saydullokhamroyevcommented, Apr 8, 2019

PS C:\Users\Saydullo Khamroyev\Pictures\HTML> npm start

fashion@1.0.0 start C:\Users\Saydullo Khamroyev\Pictures\HTML npm run build && pulp serve

fashion@1.0.0 build C:\Users\Saydullo Khamroyev\Pictures\HTML gulp build

C:\Users\Saydullo Khamroyev\Pictures\HTML\gulpfile.js:15 const replace = replace(‘gulp-replace’); ^

ReferenceError: replace is not defined at Object.<anonymous> (C:\Users\Saydullo Khamroyev\Pictures\HTML\gulpfile.js:15:17) at Module._compile (internal/modules/cjs/loader.js:799:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:810:10) at Module.load (internal/modules/cjs/loader.js:666:32) at tryModuleLoad (internal/modules/cjs/loader.js:606:12) at Function.Module._load (internal/modules/cjs/loader.js:598:3) at Module.require (internal/modules/cjs/loader.js:705:19) at require (internal/modules/cjs/helpers.js:14:16) at execute (C:\Users\Saydullo Khamroyev\Pictures\HTML\node_modules\gulp\node_modules\gulp-cli\lib\versioned^4.0.0\i ndex.js:36:18) at Liftoff.handleArguments (C:\Users\Saydullo Khamroyev\Pictures\HTML\node_modules\gulp\node_modules\gulp-cli\index. js:196:24) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! fashion@1.0.0 build: gulp build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the fashion@1.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Saydullo Khamroyev\AppData\Roaming\npm-cache_logs\2019-04-08T14_03_51_884Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! fashion@1.0.0 start: npm run build && pulp serve npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the fashion@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Saydullo Khamroyev\AppData\Roaming\npm-cache_logs\2019-04-08T14_03_52_019Z-debug.log

Read more comments on GitHub >

github_iconTop Results From Across the Web

Replace is not defined, but why? - javascript - Stack Overflow
replace is undefined. It is not an object. Use replace from the string prototype "string".replace(//, "");. As you can see:
Read more >
TypeError: replace is not a function in JavaScript | bobbyhadz
The "replace is not a function" error occurs when we call the replace() method on a value that is not of type string...
Read more >
NameError: name 'replace' is not defined - FEniCS Project
I just updated to Ubuntu 18.04. The code that used to work normally now has the following error: E_du = replace(E_u,{u:du}) NameError: name ......
Read more >
ReferenceError: replace is not defined · Issue #4055 - GitHub
Pasting images from a clipboard (cmd +c, cmd + v) cause Uncaught ReferenceError: replace is not defined error.
Read more >
String.prototype.replace() - JavaScript - MDN Web Docs
The replace() method returns a new string with one, some, or all matches of a pattern replaced by a replacement .
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