Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Error when selecting local deployment option #1

Closed
dbouffard opened this issue Jan 11, 2018 · 4 comments
Closed

Error when selecting local deployment option #1

dbouffard opened this issue Jan 11, 2018 · 4 comments

Comments

@dbouffard
Copy link

2018-01-11 14_26_54-

PS D:\ps_aarp> yo coveo

 _-----_
|       |    ╭──────────────────────────╮
|--(o)--|    │  Welcome to the fabulous │

---------´ │ Coveo Project generator! │ ( _´U_ ) ╰──────────────────────────╯
/A\ /
| ~ |
'..'_
´ |° ´ Y

? Your project name? ps_aarp
? How do you want to connect to your Coveo Organization ? Connect to a sample organization owned by Coveo for demo purp
oses
? Select the type of Coveo deployment
You must be inside a folder named ps-aarp-search-ui
I'll automatically create this folder.
(node:1604) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
create package.json
create README.MD
create scripts\setup.js
create sass\HelloWorld.scss
create sass\Index.scss
create tsconfig.json
create tslint.json
create src\ui\HelloWorld.ts
create src\Index.ts
create index.js
npm WARN deprecated tsd@0.6.5: TSD is deprecated in favor of Typings (https://github.com/typings/typings) - see DefinitelyTyped/tsd#269 for more information
npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

node-sass@4.7.2 install D:\ps_aarp\ps-aarp-search-ui\node_modules\node-sass
node scripts/install.js

Cached binary found at C:\Users\dbouffard\AppData\Roaming\npm-cache\node-sass\4.7.2\win32-x64-59_binding.node

node-sass@4.7.2 postinstall D:\ps_aarp\ps-aarp-search-ui\node_modules\node-sass
node scripts/build.js

Binary found at D:\ps_aarp\ps-aarp-search-ui\node_modules\node-sass\vendor\win32-x64-59\binding.node
Testing binary
Binary is fine
npm WARN rollback Rolling back node-pre-gyp@0.6.39 failed (this is probably harmless): EPERM: operation not permitted, scandir 'D:\ps_aarp\ps-aarp-search-ui\node_modules\fsevents\node_modules'

coveo.customization.ps_aarp@1.0.0 postinstall D:\ps_aarp\ps-aarp-search-ui
npm run build && npm run dev

coveo.customization.ps_aarp@1.0.0 build D:\ps_aarp\ps-aarp-search-ui
npm run setup && npm run sass && npm run prettier && npm run tslint && npm run ts

coveo.customization.ps_aarp@1.0.0 setup D:\ps_aarp\ps-aarp-search-ui
node scripts/setup.js

coveo.customization.ps_aarp@1.0.0 sass D:\ps_aarp\ps-aarp-search-ui
node-sass sass/Index.scss staticresources/ps_aarp_unzip/css/coveo.customization.ps_aarp.css

Rendering Complete, saving .css file...
Wrote CSS to D:\ps_aarp\ps-aarp-search-ui\staticresources\ps_aarp_unzip\css\coveo.customization.ps_aarp.css

coveo.customization.ps_aarp@1.0.0 prettier D:\ps_aarp\ps-aarp-search-ui
prettier --single-quote --print-width 120 --write 'src/**/*.ts'

[error] No matching files. Patterns tried: 'src//*.ts' !/node_modules/** !./node_modules/**
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! coveo.customization.ps_aarp@1.0.0 prettier: prettier --single-quote --print-width 120 --write 'src/**/*.ts'
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the coveo.customization.ps_aarp@1.0.0 prettier 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\dbouffard\AppData\Roaming\npm-cache_logs\2018-01-11T19_30_53_512Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! coveo.customization.ps_aarp@1.0.0 build: npm run setup && npm run sass && npm run prettier && npm run tslint && npm run ts
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the coveo.customization.ps_aarp@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\dbouffard\AppData\Roaming\npm-cache_logs\2018-01-11T19_30_53_543Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! coveo.customization.ps_aarp@1.0.0 postinstall: npm run build && npm run dev
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the coveo.customization.ps_aarp@1.0.0 postinstall 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\dbouffard\AppData\Roaming\npm-cache_logs\2018-01-11T19_30_53_622Z-debug.log
ReferenceError: C:\Users\dbouffard\AppData\Roaming\npm\node_modules\generator-coveo\generators\typescript\templates\webpack.config.js:11
9| plugins.push(new webpack.optimize.UglifyJsPlugin());
10| }

11| <% if(salesforce) { %>
12| const coveoComponentMock = `
13| <script src="../vendor/coveo/js/CoveoJsSearch.Lazy.js"></script>
14| <script src="../vendor/coveo/js/templates/templates.js"></script>

salesforce is not defined
at eval (eval at compile (C:\Users\dbouffard\AppData\Roaming\npm\node_modules\generator-coveo\node_modules\ejs\lib\ejs.js:549:12), :11:8)
at returnedFn (C:\Users\dbouffard\AppData\Roaming\npm\node_modules\generator-coveo\node_modules\ejs\lib\ejs.js:580:17)
at Object.exports.render (C:\Users\dbouffard\AppData\Roaming\npm\node_modules\generator-coveo\node_modules\ejs\lib\ejs.js:384:37)
at process (C:\Users\dbouffard\AppData\Roaming\npm\node_modules\generator-coveo\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:12:18)
at applyProcessingFunc (C:\Users\dbouffard\AppData\Roaming\npm\node_modules\generator-coveo\node_modules\mem-fs-editor\lib\actions\copy.js:13:16)
at EditionInterface.exports._copySingle (C:\Users\dbouffard\AppData\Roaming\npm\node_modules\generator-coveo\node_modules\mem-fs-editor\lib\actions\copy.js:63:16)
at files.forEach.file (C:\Users\dbouffard\AppData\Roaming\npm\node_modules\generator-coveo\node_modules\mem-fs-editor\lib\actions\copy.js:50:10)
at Array.forEach ()
at EditionInterface.exports.copy (C:\Users\dbouffard\AppData\Roaming\npm\node_modules\generator-coveo\node_modules\mem-fs-editor\lib\actions\copy.js:49:9)
at EditionInterface.module.exports [as copyTpl] (C:\Users\dbouffard\AppData\Roaming\npm\node_modules\generator-coveo\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:10:8)
PS D:\ps_aarp>

@dbouffard
Copy link
Author

Same problem with Salesforce. Has it been tested on Windows ? Running Windows 10.c

@bennomatic
Copy link

15 days later, SF works for me--at least on the mac--but the local option does not.

@bennomatic
Copy link

@dbouffard I found a solution. In the affected file, just replace two instances of...

<% if (salesforce) { %>

with

<% if (!(typeof salesforce === 'undefined' || salesforce === null)) { %>

I may try to do a PR tomorrow when I've got a little time.

@coveoben
Copy link

coveoben commented Feb 6, 2018

OK, I've submitted a PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants