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.

Uncaught TypeError: Path must be a string. Received null

See original GitHub issue

[Enter steps to reproduce:]

  1. Honestly, I’m not sure. I’m simply saving a .js file, with format-on-save enabled. This was working like 10 minutes ago but is no longer working. After receiving the error a first time, I was prompted to updated Atom. I updated Atom and am still getting the error.

Atom: 1.14.4 x64 Electron: 1.3.13 OS: Microsoft Windows 10 Pro Thrown From: prettier-atom package 0.21.0

Stack Trace

Uncaught TypeError: Path must be a string. Received null

At C:\Users\Ryan\AppData\Local\atom\app-1.14.4\resources\app.asar\src\pane.js:1045

TypeError: Path must be a string. Received null
    at assertPath (path.js:7:11)
    at Object.parse (path.js:952:5)
    at getDirFromFilePath (/packages/prettier-atom/dist/helpers.js:32:15)
    at /packages/prettier-atom/dist/helpers.js:27:61
    at /packages/prettier-atom/dist/helpers.js:27:55
    at getFilePathRelativeToEslintignore (/packages/prettier-atom/dist/helpers.js:42:5)
    at isFilePathEslintignored (/packages/prettier-atom/dist/helpers.js:97:83)
    at formatOnSaveIfAppropriate (/packages/prettier-atom/dist/formatOnSave.js:20:38)
    at lazyFormatOnSave (/packages/prettier-atom/dist/main.js:31:15)
    at /packages/prettier-atom/dist/main.js:45:12
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at TextBuffer.module.exports.TextBuffer.saveAs (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1060:20)
    at TextBuffer.module.exports.TextBuffer.save (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1049:19)
    at TextEditor.module.exports.TextEditor.save (/app.asar/src/text-editor.js:893:26)
    at Pane.module.exports.Pane.saveItem (/app.asar/src/pane.js:753:18)
    at Pane.saveItem (/app.asar/src/pane.js:3:59)
    at Pane.module.exports.Pane.saveActiveItem (/app.asar/src/pane.js:736:19)
    at Workspace.module.exports.Workspace.saveActivePaneItem (/app.asar/src/workspace.js:693:35)
    at /app.asar/src/register-default-commands.js:225:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

     -0:28.3.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.theme-oceanic-next.theme-one-dark-ui)
     -0:23.1.0 core:save (input.hidden-input)

Non-Core Packages

autocomplete-modules 1.6.7 
file-icons 2.0.17 
language-babel 2.56.0 
language-graphql 0.8.0 
linter 1.11.23 
linter-eslint 8.1.2 
oceanic-next 1.0.0 
prettier-atom 0.21.0 

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
thtliifecommented, Mar 6, 2017

Confirmed fixed in v0.21.2 Thanks for the fast work @robwise 😃

2reactions
thtliifecommented, Mar 5, 2017

Wow @robwise that was FAST! Loving this package btw… 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nodejs: Path must be a string. Received null - Stack Overflow
I was trying to implement the following code and got the TypeError error when I ran it. app.js
Read more >
"Path must be a string. Received undefined" #144 - zkat/npx
npm v5.51 node v8.9.0 ... it seems that anytime I run an npx command it shows "Path must be a string. Received undefined"...
Read more >
path must be a string. received undefined when building a ...
I'm attempting to build a xamarin.ios project on a hosted agent. The project builds fine on a private agent we use, but in...
Read more >
[Fix] TypeError [ERR_INVALID_ARG_TYPE]: The “path ...
Have you run into the error “TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined”? In this story I'll go...
Read more >
npm error: TypeError('Path must be a string. Received ... - Reddit
npm error: TypeError('Path must be a string. Received ' + inspect(path));\n. Node keeps ...
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