No session secret provided, please set `secret` for apostrophe-express module

84 views
Skip to first unread message

Jermaine Oppong

unread,
Sep 12, 2016, 1:11:21 PM9/12/16
to apostrophenow
Hello all,

I am in the process of getting apostrophe to run by following the instructions detailed here: 

I have installed the cli tool and created my first project. However running 'node app.js' throws this exception:

WARNING: No session secret provided, please set `secret` for apostrophe-express module in app.js
fs.js:897
  return binding.symlink(preprocessSymlinkDestination(target, type, path),
                 ^

Error: EPERM: operation not permitted, symlink 'C:\Users\admin\Desktop\Projects\apos-project\node_modules\apostrophe\lib\modules\apostrophe-assets\public' -> 'C:\Users\admin\Desktop\Projects\apos-project\public\modules\apostrophe-assets'
    at Error (native)
    at Object.fs.symlinkSync (fs.js:897:18)
    at C:\Users\admin\Desktop\Projects\apos-project\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:403:14
    at C:\Users\admin\Desktop\Projects\apos-project\node_modules\lodash\index.js:3073:15
    at baseForOwn (C:\Users\admin\Desktop\Projects\apos-project\node_modules\lodash\index.js:2046:14)
    at C:\Users\admin\Desktop\Projects\apos-project\node_modules\lodash\index.js:3043:18
    at Function.<anonymous> (C:\Users\admin\Desktop\Projects\apos-project\node_modules\lodash\index.js:3346:13)
    at self.symlinkModules (C:\Users\admin\Desktop\Projects\apos-project\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:384:9)
    at C:\Users\admin\Desktop\Projects\apos-project\node_modules\async\lib\async.js:718:13
    at iterate (C:\Users\admin\Desktop\Projects\apos-project\node_modules\async\lib\async.js:262:13)
    at async.forEachOfSeries.async.eachOfSeries (C:\Users\admin\Desktop\Projects\apos-project\node_modules\async\lib\async.js:281:9)
    at _parallel (C:\Users\admin\Desktop\Projects\apos-project\node_modules\async\lib\async.js:717:9)
    at Object.async.series (C:\Users\admin\Desktop\Projects\apos-project\node_modules\async\lib\async.js:739:9)
    at Object.self.afterInit (C:\Users\admin\Desktop\Projects\apos-project\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:348:20)
    at C:\Users\admin\Desktop\Projects\apos-project\node_modules\apostrophe\index.js:91:25
    at C:\Users\admin\Desktop\Projects\apos-project\node_modules\async\lib\async.js:181:20


I attempted to add configuration for apostrophe-express by adding the code below to the app.js config object, but still not working:
var apos = require('apostrophe')({
    //...
    modules: {
        //...
        'apostrophe-express': {
              secret: 'secret password'
        }
    }
});

I also tried:
var apos = require('apostrophe')({
    //...
    secret: 'secret password'
});


I am investigating ApostropheCMS as a possible content management solution for the company I work at. 

Any help would be really appreciated.

Many thanks in advance.

Tom Boutell

unread,
Sep 12, 2016, 1:15:56 PM9/12/16
to apostr...@googlegroups.com
Hi Jermaine,

The secret thing is a red herring here. What's really clobbering you
is that we're trying to make symbolic links on Windows and of course
we can't (well, not without running as admin, which you don't want us
to do).

In A2 0.5 we worked through this and figured out we should recursively
copy the asset folders (public folders) rather than symlinking them on
Windows. We should do that again.

Most likely we'll make the distinction in the symlinkModules method of
apostrophe-assets/index.js, or possibly we'll detect the difference
and call a separate method so the name isn't misleading.

Running node as admin is a good but temporary workaround.

Please open a github issue so you can know when we've resolved this
for 2.0. You can assign it to boutell.

(If your production environment is Linux this won't be an issue for you there.)

Thanks!
> --
> You received this message because you are subscribed to the Google Groups
> "apostrophenow" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to apostropheno...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--


THOMAS BOUTELL, SUPPORT LEAD
P'UNK AVENUE | (215) 755-1330 | punkave.com

Tom Boutell

unread,
Sep 12, 2016, 1:16:48 PM9/12/16
to apostr...@googlegroups.com
As for the secret thing:

modules: {

'apostrophe-express': {

session: {

secret: 'yoursecrethere'

}

}
}

So there's one more level. Which we should clarify in the warning
message. But again, it's not what's preventing you from getting
airborne.
Reply all
Reply to author
Forward
0 new messages