Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on npm build #2

Closed
10polarbears opened this issue Aug 6, 2019 · 18 comments
Closed

Error on npm build #2

10polarbears opened this issue Aug 6, 2019 · 18 comments

Comments

@10polarbears
Copy link

After following you Workflow Boilerplate approach.

I keep getting these errors when running npm build following 261 other errors.
Is there somewhere I can start looking to fix this?

If I continue an run the location server quite often the files test out fine. However when I attempt to run them from my server they can quite often fail when trying to import texture files.

Any help at all would be appreciated. Unfortunately I don't seem t know what I am doing.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! babylonjs-editor-generated-template@0.0.1 compile: tsc -p .
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the babylonjs-editor-generated-template@0.0.1 compile 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! /Users/trevorcoates/.npm/_logs/2019-08-06T08_28_31_781Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! babylonjs-editor-generated-template@0.0.1 build: npm run clean && npm run compile
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the babylonjs-editor-generated-template@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@the-simian
Copy link
Member

@10polarbears , can you check out that debug-log that got written? looks like there's a problem with a dependency maybe

@10polarbears
Copy link
Author

Thank you for your response. Here is the log. It appears that the Babylon template has issues.
The Babylon support forum address has been archived.

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/Cellar/node/12.7.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'compile'
1 verbose cli ]
2 info using npm@6.10.0
3 info using node@v12.7.0
4 verbose run-script [ 'precompile', 'compile', 'postcompile' ]
5 info lifecycle babylonjs-editor-generated-template@0.0.1precompile: babylonjs-editor-generated-template@0.0.1
6 info lifecycle babylonjs-editor-generated-template@0.0.1
compile: babylonjs-editor-generated-template@0.0.1
7 verbose lifecycle babylonjs-editor-generated-template@0.0.1compile: unsafe-perm in lifecycle true
8 verbose lifecycle babylonjs-editor-generated-template@0.0.1
compile: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Volumes/Work_RAID/604_webGL_learning/web-project/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Volumes/Work_RAID/604_webGL_learning/web-project/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
9 verbose lifecycle babylonjs-editor-generated-template@0.0.1compile: CWD: /Volumes/Work_RAID/604_webGL_learning/web-project
10 silly lifecycle babylonjs-editor-generated-template@0.0.1
compile: Args: [ '-c', 'tsc -p .' ]
11 silly lifecycle babylonjs-editor-generated-template@0.0.1compile: Returned: code: 2 signal: null
12 info lifecycle babylonjs-editor-generated-template@0.0.1
compile: Failed to exec compile script
13 verbose stack Error: babylonjs-editor-generated-template@0.0.1 compile: tsc -p .
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:203:13)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:203:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid babylonjs-editor-generated-template@0.0.1
15 verbose cwd /Volumes/Work_RAID/604_webGL_learning/web-project
16 verbose Darwin 17.7.0
17 verbose argv "/usr/local/Cellar/node/12.7.0/bin/node" "/usr/local/bin/npm" "run" "compile"
18 verbose node v12.7.0
19 verbose npm v6.10.0
20 error code ELIFECYCLE
21 error errno 2
22 error babylonjs-editor-generated-template@0.0.1 compile: tsc -p .
22 error Exit status 2
23 error Failed at the babylonjs-editor-generated-template@0.0.1 compile script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

Sample of 261 errors reported in Terminal.

node_modules/babylonjs-editor/node_modules/babylonjs/babylon.module.d.ts:37275:9 - error TS2416: Property '_getViewMatrix' in type 'ArcRotateCamera' is not assignable to the same property in base type 'TargetCamera'.
Type '() => import("babylonjs/Maths/math.vector").Matrix' is not assignable to type '() => import("babylonjs/Maths/math").Matrix'.
Type 'import("babylonjs/Maths/math.vector").Matrix' is not assignable to type 'import("babylonjs/Maths/math").Matrix'.

37275 _getViewMatrix(): Matrix;

@the-simian
Copy link
Member

the-simian commented Aug 7, 2019

quick question: was this with the projects in this actual repo, or was this with a freshly templated version of the editor?
Property '_getViewMatrix' in type 'ArcRotateCamera' is not assignable to the same property in base type 'TargetCamera'.

it appears there's some issue related to the camera. I think at this point I'd need to try pulling and running myself, and determining if its a bug in the more recent version of the Editor or the templated issues in this repo.

Did you download the Editor and follow the tutorial or get this error with the projects in here? Thanks for checking. I won't be able to look for some time, myself

also: did you get a browser to pop up? was there anything in the console? this all helps me figure it out

@10polarbears
Copy link
Author

10polarbears commented Aug 7, 2019 via email

@the-simian
Copy link
Member

there's a lot of moving parts in your description and lets take it one step at a time, if that's ok. You're talking about importing things from Maya, local servers, remote servers, I see typescript errors too. There's so many moving parts, I'm not zeroing in on what might be your issue. My first thought is that you're having some kind of typescript error or something, because these all seem primarily to be ts thrown.

@10polarbears just to cover our bases: can you clone this: https://github.com/simiancraft/BabylonJs-Editor-Workflow-Boilerplate/tree/master/web-project

and run it locally? I don't mean generating from your editor, but just clone, npm install and run (locally).

@10polarbears
Copy link
Author

10polarbears commented Aug 8, 2019 via email

@10polarbears
Copy link
Author

10polarbears commented Aug 8, 2019 via email

@the-simian
Copy link
Member

@10polarbears yes, that's the generated web project that I used when making the tutorial

@10polarbears
Copy link
Author

10polarbears commented Aug 8, 2019 via email

@10polarbears
Copy link
Author

10polarbears commented Aug 8, 2019 via email

@the-simian
Copy link
Member

the-simian commented Aug 8, 2019

no sweat, that's just a typo: You have 3 l's in the word 'install.

Also, I hate to bother you about this, but can you stop replying by email, because it is making a lot of noise in this thread issue, such as including previous items in the thread as well as your confidentiality clause, etc. (Please be aware we are posting in a public thread at the moment)

I'll be happy to help, try copying and pasting from the readme for the commands too, if you're unsure about spelling.

I see the project runs ok, so I think the issue might be your environment and typescript setup, so I'm closing the issue for now. If someone else has a problem and references this issue I'll reopen

@10polarbears
Copy link
Author

Apologies for the noise.

Works just fine from web server also.

@10polarbears
Copy link
Author

Here is the main discrepancy:

package.json – seems to have the main difference

The editor uses: "http-server": "^0.11.1"

"license": "(Apache-2.0)",
"devDependencies": {
"@types/systemjs": "0.20.6",
"@types/javascript-astar": "~0.0.30",
"typescript": "~3.5.1",
"http-server": "^0.11.1"

Whereas the GitHub version uses: "http-server": "^0.9.0"

"license": "(Apache-2.0)",
"devDependencies": {
"@types/systemjs": "0.20.6",
"@types/javascript-astar": "~0.0.30",
"typescript": "~3.5.1",
"http-server": "^0.9.0"

@the-simian
Copy link
Member

@10polarbears you know what? I seem to recall http-server was broken for me too now that you mention it. http-party/http-server#534

I tried upgrading and had to downgrade. It was a really challenging issue for me! If you manged to figure that out, seriously - pat yourself on the back. It was hard. I know because you've jogged my own memory and I remember it.

At some point I just need to change that to webpack and submit a PR to Julian, which I think he'd appreciate.

Thanks for the followup and seriously, GOOD JOB!

@10polarbears
Copy link
Author

10polarbears commented Aug 9, 2019

Thank you.

I am finding the whole editor thing quite a stumbling block. Things don't seem to work properly. eg trying to find a DDS format that will actually import is practically impossible. When you do the files sizes explode.
When you watch the out-of-date tutorials there is a section where you select the scene then choose the View>Code function where looks a breeze in V2 but in V3 nothing but an empty window.
I am sure the deeper I look into the editor the more confused I am likely to become.

@10polarbears
Copy link
Author

10polarbears commented Aug 9, 2019

The full list of manual depreciation:
@game.ts
const "name of babylonFile" = ./scene/;
let currentScene = "name of babylonFile";

SceneLoader.Load(
  `${currentScene}`,
  "scene.babylon",
  this.engine,
  (scene: Scene) => {
    this.scene = scene;
    console.log(this.scene);

@package.json
"typescript": "~3.5.1",
"http-server": "^0.9.0"

"babylonjs-editor": "3.1.1",
"cannon": "~0.6.2",

@10polarbears
Copy link
Author

This is so hit and miss. In my web server I now get:

It would appear the editor isn't quite yet ready for webGL 2.

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (favicon.ico, line 0)
[Log] Babylon.js v4.0.3 - WebGL1
[Log] Scene {rootNodes: Array, cameras: Array, lights: Array, meshes: Array, skeletons: [], …}
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (montrealenvmapmedEnvHDR.dds, line 0)
[Warning] BJS - [12:58:27]: _DDSTextureLoader failed when trying to load ./scene/montrealenvmapmedEnvHDR.dds, falling back to the next supported loader
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (hughanPot_final_01.jpg, line 0)
[Error] BJS - [12:58:27]: Error while trying to load image: ./scene/hughanPot_final_01.jpg
_ErrorEnabled (babylon.max.js:106123)
errorHandler (babylon.max.js:110188)

@the-simian
Copy link
Member

@10polarbears if you're finding issues, you might go to the Editor's main git repo, this is just a repo for the boilerplate I made. If you carefully log issues, Julian is very responsive.

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

No branches or pull requests

2 participants