Strider-CD / strider

Open Source Continuous Integration & Deployment Server
http://strider-cd.github.io/
4.6k stars 432 forks source link

Failed to lookup view #1091

Closed scottlet closed 4 years ago

scottlet commented 4 years ago

Upgraded from a very old install to the latest using the install instructions. I can log in and get to the main page listing all my projects. Triggered a build on a project, it failed. Tried to look at the project's page and I get the following error:

Failed to lookup view "dist/index.html" in views directories "/home/node/strider/dist-lib/views" or "/home/node/strider/client-ember"

URL is https://[domain]/[project]/[project-name]/?ember=true

scottlet commented 4 years ago

Actually looks like a build error, having tried to rerun it I get:


> strider@2.4.1 build /home/node/strider
> npm run pre && npm run styles && browserify -d -t [babelify --presets [ es2015 ] --only client] -p [minifyify --output dist/scripts/bundle.map] -e client/app.js -o dist/scripts/app.js

> strider@2.4.1 pre /home/node/strider
> mkdirp dist/scripts dist/styles

> strider@2.4.1 styles /home/node/strider
> lessc client/styles/strider.less > dist/styles/styles.css

uglify-js failed on public/libs/ui-bootstrap.js : SyntaxError: Unexpected character '`'
uglify-js failed on public/libs/ui-codemirror.js : SyntaxError: Unexpected character '`'
uglify-js failed on vendor/bootstrap/js/bootstrap.js : SyntaxError: Unexpected character '`'
uglify-js failed on vendor/CodeMirror/js/codemirror.js : SyntaxError: Unexpected character '`'
uglify-js failed on vendor/jquery-timeago/js/jquery.timeago.js : SyntaxError: Unexpected character '`'
uglify-js failed on vendor/Sortable/js/Sortable.js : SyntaxError: Unexpected character '`'
uglify-js failed on vendor/bootbox/js/bootbox.js : SyntaxError: Unexpected character '`'
uglify-js failed on node_modules/strip-ansi/index.js : SyntaxError: Unexpected token: operator (>)
uglify-js failed on node_modules/strip-ansi/node_modules/ansi-regex/index.js : SyntaxError: Unexpected token: operator (>)
uglify-js failed on node_modules/debug/src/browser.js : SyntaxError: Unexpected token: name (index)
uglify-js failed on node_modules/debug/src/common.js : SyntaxError: Unexpected token: operator (>)
knownasilya commented 4 years ago

Those errors should not prevent it from working. Did you install from npm or GitHub directly?

The assets should be there. As a workaround try

cd client-ember
yarn install
yarn build
knownasilya commented 4 years ago

Should be fixed in v2.4.2

scottlet commented 4 years ago

It's a very old install, NPM originally. I wiped the NPM directory, checked out the github repo and ran npm install and I've been having some trouble with it.

On Fedora 32, node v12.16.1 I didn't have yarn installed as it's not listed as a dependency on the install page, however. Don't know if that matters.

Tried what you suggested above and I get a linting error

strider/templates/application.hbs
  2:2  error  All `<button>` elements should have a valid `type` attribute  require-button-type

I get a typescript error

app/services/live.ts:2:25 - error TS2307: Cannot find module '@glimmer/tracking'.

2 import { tracked } from '@glimmer/tracking';
                          ~~~~~~~~~~~~~~~~~~~

../node_modules/@types/mongoose/index.d.ts:1651:7 - error TS2416: Property 'set' in type 'Array<T>' is not assignable to the same property in base type 'T[]'.
  Type '(i: number, val: any) => this' is not assignable to type '{ <K extends keyof this>(key: K, value: this[K]): this[K]; <T>(key: keyof this, value: T): T; }'.
    Type 'this' is not assignable to type 'this[any]'.
      Type 'Array<T>' is not assignable to type 'this[any]'.
        Type 'Array<T>' is not assignable to type 'T'.
          'Array<T>' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.
            Type 'this' is not assignable to type 'T'.
              'this' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.
                Type 'Array<T>' is not assignable to type 'T'.
                  'Array<T>' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.

1651       set(i: number, val: any): this;

But ultimately it completes.

So I restart Strider. I can get to the project page now, but when I trigger a build it fails. Looking at the log, I get npm ERR! invalid bin entry for package @babel/parser@7.9.6. key=parser, value=bin/babel-parser.js which I'm guessing is Strider as my project doesn't use Babel. Any ideas? I tried npm i -g @babel/parser and that doesn't help :)

scottlet commented 4 years ago

...or should I just re-checkout and try again now I have yarn installed?

knownasilya commented 4 years ago

Add DEBUG=strider* to your start command to see what's going on with your build. Paste the logs once you have them.

scottlet commented 4 years ago

Startup I get this:


2020-05-02T13:48:48.418Z - info: Connecting to MongoDB URL: mongodb://localhost:27017/strider-foss

2020-05-02T13:48:48.467Z - info: prod config
Error: Cannot find module '../build/Release/bson'
Require stack:
- /home/node/strider/node_modules/strider-webhooks/node_modules/bson/ext/index.js
- /home/node/strider/node_modules/strider-webhooks/node_modules/bson/lib/bson/index.js
- /home/node/strider/node_modules/strider-webhooks/webapp.js
- /home/node/strider/node_modules/strider-extension-loader/lib/index.js
- /home/node/strider/node_modules/strider-extension-loader/main.js
- /home/node/strider/dist-lib/index.js
- /home/node/strider/bin/strider
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/node/strider/node_modules/strider-webhooks/node_modules/bson/ext/index.js:15:10)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/node/strider/node_modules/strider-webhooks/node_modules/bson/lib/bson/index.js:3:24)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/node/strider/node_modules/strider-webhooks/webapp.js:1:16)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at /home/node/strider/node_modules/strider-extension-loader/lib/index.js:324:29
    at /home/node/strider/node_modules/strider-extension-loader/lib/index.js:355:11
    at /home/node/strider/node_modules/strider-extension-loader/node_modules/async/lib/async.js:511:21 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/node/strider/node_modules/strider-webhooks/node_modules/bson/ext/index.js',
    '/home/node/strider/node_modules/strider-webhooks/node_modules/bson/lib/bson/index.js',
    '/home/node/strider/node_modules/strider-webhooks/webapp.js',
    '/home/node/strider/node_modules/strider-extension-loader/lib/index.js',
    '/home/node/strider/node_modules/strider-extension-loader/main.js',
    '/home/node/strider/dist-lib/index.js',
    '/home/node/strider/bin/strider'
  ]
}
2020-05-02T13:48:50.119Z - info: Express server listening on port 3000 in production mode```
knownasilya commented 4 years ago

Looks like you need to reinstall. Do npm install -g yarn and then yarn install.

scottlet commented 4 years ago

OK thanks. Will give it a go