atom-project-plus icon indicating copy to clipboard operation
atom-project-plus copied to clipboard

Unable to save projects

Open billdami opened this issue 6 years ago • 8 comments

On Atom 1.18.0 (on macOS Sierra 10.12.6), I am unable to save projects via the 'Project Plus: Save' command. I get the following error in the Dev Console:

session.js [sm]:131 Uncaught (in promise) TypeError: _atomProjectUtil2.default.save is not a function(…)
save @ session.js [sm]:131
(anonymous function) @ provider-manager.js [sm]:33
(anonymous function) @ provider-manager.js [sm]:32
invoke @ provider-manager.js [sm]:31
save @ provider-manager.js [sm]:63
projectPlusSave @ project-plus.js [sm]:40
module.exports.CommandRegistry.handleCommandEvent @ <embedded>:18901
(anonymous function) @ <embedded>:18639
didConfirmSelection @ <embedded>:42377confirmSelection @ <embedded>:50267
core:confirm @ <embedded>:50035
module.exports.CommandRegistry.handleCommandEvent @ <embedded>:18901
(anonymous function) @ <embedded>:18639
module.exports.KeymapManager.dispatchCommandEvent @ <embedded>:66514
module.exports.KeymapManager.handleKeyboardEvent @ <embedded>:66305
module.exports.WindowEventHandler.handleDocumentKeyEvent @ <embedded>:15166
(anonymous function) @ <embedded>:15069

billdami avatar Jul 26 '17 14:07 billdami

Note that I am able to manually edit the ~/.atom/project.cson file to add new projects, and they are properly listed in the Atom UI, so it seems it just the Save operation itself that is broken.

billdami avatar Jul 26 '17 14:07 billdami

Same here:

Atom    : 1.19.0-beta5
Electron: 1.6.9
Chrome  : 56.0.2924.87
Node    : 7.4.0

slavaGanzin avatar Aug 02 '17 13:08 slavaGanzin

I'm getting the same error:

Uncaught (in promise) TypeError: _atomProjectUtil2.default.save is not a function at SessionProvider.save (/.atom/packages/project-plus/lib/provider/session.js:131:28)

Atom 1.21.0 Windows 10

davidbarredo avatar Oct 10 '17 10:10 davidbarredo

Any fix for this yet?

brycefranzen avatar Nov 09 '17 23:11 brycefranzen

I cannot save projects as well, but no excption.

If only I'd knew how to edit the list of projects. What needs to go into the cson file?

Skeeve avatar Jan 23 '18 08:01 Skeeve

This is an example of one project in my cson file:

dummyserver:
  title: "dummy-server"
  paths: [
    "pathtoproject\\dummy-server"
  ]

Add as many as you need

Hope it helps 😉

davidbarredo avatar Jan 23 '18 09:01 davidbarredo

Thanks. I switched, for the moment, to project-manager 3.3.5

Skeeve avatar Jan 23 '18 09:01 Skeeve

The problem seems to be related to his own library, https://github.com/mehcode/atom-project-util There is no such function as save exported from it.

Reviewing older commits, there was a function named saveState in the lib/provider/session.js in this project, which was working propertly. But as from 0.8.1 this function has disappeared and therefore it must have been failing since that release.

I am neither sure nor have the time right now to go deeper into this, but I hope this short explanation may help you implement correct save function

bguzmanrio avatar Feb 12 '18 09:02 bguzmanrio