Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Project doesn't build (Win10 64bit) #484

Closed
deroude opened this issue Jan 23, 2018 · 13 comments
Closed

Project doesn't build (Win10 64bit) #484

deroude opened this issue Jan 23, 2018 · 13 comments

Comments

@deroude
Copy link

deroude commented Jan 23, 2018

The following listing shows the steps and the outcome:

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS D:\Projects\Mindit> cd poc
PS D:\Projects\Mindit\poc> yo laxarjs2

LaxarJS application generator v2.3.0

This generator will create the basic file- and directory structure of a LaxarJS application in the current directory.

For more information about a LaxarJS application, please see the docs at
https://laxarjs.org/docs/laxar-v2-latest/concepts/
? The application name: poc
? Description (optional):
? License: MIT
? Project homepage (optional): home
? Author name (optional):
? Select integration technologies to include:
 AngularJS 1.x ("angular")
? Should a set of example widgets be generated? Yes
   create package.json
   create debug.html
   create favicon.ico
   create index.html
   create init.js
   create laxar.config.js
   create README.md
   create webpack.config.js
   create .babelrc
   create .gitignore
   create application\flows\main.json
   create application\layouts\one-column\default.theme\css\one-column.css
   create application\layouts\one-column\default.theme\one-column.html
   create application\layouts\one-column\layout.json
   create application\pages\home.json
   create application\widgets\example\plain-hello-world-widget\default.theme\plain-hello-world-widget.html
   create application\widgets\example\plain-hello-world-widget\plain-hello-world-widget.js
   create application\widgets\example\plain-hello-world-widget\widget.json
   create application\widgets\example\angular-hello-world-widget\angular-hello-world-widget.js
   create application\widgets\example\angular-hello-world-widget\default.theme\angular-hello-world-widget.html
   create application\widgets\example\angular-hello-world-widget\widget.json

Now run npm install to get tools and dependencies.
Then you can run npm start to start the development server.
There, enter the application through the debug.html.
The README.md contains more information.

Have fun developing your LaxarJS application!

Also, please have a look at the manuals:
https://laxarjs.org/docs/laxar-v2-latest/manuals/
PS D:\Projects\Mindit\poc> npm install
npm WARN deprecated [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: ple
ase read babeljs.io/env to update!
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.co
m/gulpjs/gulp-util-ca3b1f9f9ac5

> [email protected] install D:\Projects\Mindit\poc\node_modules\phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Download already available at C:\Users\VALENT~1.RAD\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing D:\Projects\Mindit\poc\node_modules\phantomjs-prebuilt\lib\phantom
Copying extracted folder C:\Users\VALENT~1.RAD\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip-extract-15167180
90909\phantomjs-2.1.1-windows -> D:\Projects\Mindit\poc\node_modules\phantomjs-prebuilt\lib\phantom
Writing location.js file
Done. Phantomjs binary available at D:\Projects\Mindit\poc\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe

> [email protected] install D:\Projects\Mindit\poc\node_modules\wd
> node scripts/build-browser-scripts


> [email protected] install D:\Projects\Mindit\poc\node_modules\node-sass
> node scripts/install.js

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

> [email protected] postinstall D:\Projects\Mindit\poc\node_modules\spawn-sync
> node postinstall


> [email protected] postinstall D:\Projects\Mindit\poc\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js


> [email protected] postinstall D:\Projects\Mindit\poc\node_modules\sauce-connect-launcher
> node scripts/install.js || nodejs scripts/install.js


> [email protected] postinstall D:\Projects\Mindit\poc\node_modules\gifsicle
> node lib/install.js

  √ gifsicle pre-build test passed successfully

> [email protected] postinstall D:\Projects\Mindit\poc\node_modules\mozjpeg
> node lib/install.js

  √ mozjpeg pre-build test passed successfully

> [email protected] postinstall D:\Projects\Mindit\poc\node_modules\optipng-bin
> node lib/install.js

  √ optipng pre-build test passed successfully

> [email protected] postinstall D:\Projects\Mindit\poc\node_modules\pngquant-bin
> node lib/install.js

  √ pngquant pre-build test passed successfully
(node:1816) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emit
ter.setMaxListeners() to increase limit

> [email protected] postinstall D:\Projects\Mindit\poc\node_modules\node-sass
> node scripts/build.js

Binary found at D:\Projects\Mindit\poc\node_modules\node-sass\vendor\win32-x64-57\binding.node
Testing binary
Binary is fine

> [email protected] postinstall D:\Projects\Mindit\poc\node_modules\yo
> yodoctor


Yeoman Doctor
Running sanity checks on your system

√ Global configuration file is valid
√ NODE_PATH matches the npm root
√ Node.js version
√ No .bowerrc file in home directory
√ No .yo-rc.json file in home directory
√ npm version

Everything looks all right!
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

> [email protected] prepublish D:\Projects\Mindit\poc
> webpack --progress

Hash: 8acf6391a0cc0b3cbeb0
Version: webpack 3.10.0
Time: 12155ms
             Asset     Size  Chunks                    Chunk Names
    init.bundle.js  1.62 MB       0  [emitted]  [big]  init
init.bundle.js.map  1.92 MB       0  [emitted]         init
   [1] ./init.js 720 bytes {0} [built]
   [8] ./node_modules/laxar-loader/lib/json.js!./application/flows/main.json 82 bytes [built]
   [9] ./node_modules/laxar-loader/lib/json.js!./application/layouts/one-column/layout.json 38 bytes [built]
  [12] ./laxar.config.js 301 bytes [built]
  [13] ./node_modules/laxar-loader/lib/json.js!./application/pages/home.json 198 bytes [built]
  [17] ./node_modules/laxar-loader/lib/json.js!./application/widgets/example/plain-hello-world-widget/widget.json 271 by
tes [built]
  [18] ./node_modules/laxar-loader/lib/json.js!./application/widgets/example/angular-hello-world-widget/widget.json 277
bytes [built]
  [20] ./node_modules/json-loader!./application/widgets/example/plain-hello-world-widget/widget.json 271 bytes [built]
  [21] ./node_modules/json-loader!./application/layouts/one-column/layout.json 38 bytes [built]
  [24] ./node_modules/json-loader!./application/pages/home.json 198 bytes [built]
  [25] ./node_modules/json-loader!./application/widgets/example/angular-hello-world-widget/widget.json 277 bytes [built]
  [26] ./node_modules/json-loader!./application/flows/main.json 82 bytes [built]
    + 19 hidden modules

ERROR in ./node_modules/laxar-loader/lib?artifacts&entries&flow=main&theme=default!./node_modules/laxar-loader/dummy.js
Module build failed: Error: Can't resolve './plain-hello-world-widget' in 'D:\Projects\Mindit\poc'
    at onError (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:61:15)
    at loggingCallbackWrapper (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
    at runAfter (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:158:4)
    at innerCallback (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:146:3)
    at loggingCallbackWrapper (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
    at next (D:\Projects\Mindit\poc\node_modules\tapable\lib\Tapable.js:252:11)
    at D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:40:4
    at loggingCallbackWrapper (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
    at runAfter (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:158:4)
    at innerCallback (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:146:3)
    at loggingCallbackWrapper (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
    at next (D:\Projects\Mindit\poc\node_modules\tapable\lib\Tapable.js:252:11)
    at innerCallback (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:144:11)
    at loggingCallbackWrapper (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
    at next (D:\Projects\Mindit\poc\node_modules\tapable\lib\Tapable.js:249:35)
    at resolver.doResolve.createInnerCallback (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\DescriptionFileP
lugin.js:44:6)
    at loggingCallbackWrapper (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
    at afterInnerCallback (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:168:10)
    at loggingCallbackWrapper (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
    at next (D:\Projects\Mindit\poc\node_modules\tapable\lib\Tapable.js:252:11)
    at innerCallback (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:144:11)
    at loggingCallbackWrapper (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
    at next (D:\Projects\Mindit\poc\node_modules\tapable\lib\Tapable.js:249:35)
    at resolver.doResolve.createInnerCallback (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\DescriptionFileP
lugin.js:44:6)
    at loggingCallbackWrapper (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
    at runAfter (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:158:4)
    at innerCallback (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:146:3)
    at loggingCallbackWrapper (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\createInnerCallback.js:31:19)
    at next (D:\Projects\Mindit\poc\node_modules\tapable\lib\Tapable.js:252:11)
    at runAfter (D:\Projects\Mindit\poc\node_modules\enhanced-resolve\lib\Resolver.js:158:4)
 @ ./node_modules/laxar-loader/artifacts.js?flow=main&theme=default 2:17-108
 @ ./init.js
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] prepublish: `webpack --progress`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] prepublish 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\valentin.raduti\AppData\Roaming\npm-cache\_logs\2018-01-23T14_35_27_375Z-debug.log
PS D:\Projects\Mindit\poc>
@alex3683
Copy link
Member

Hi @deroude ,
sorry for the late reply. I can confirm the error on my machine, yet I didn't have time to look into this. Probably there is some Unix-only path mangling going on, that needs to be fixed.
I'll have a look at it as soon as possible, but can't promise a fix tomorrow ;-)
If any of you other guys (@x1B / @jpommerening ) has access to a "real" windows 10 environment, feel free to have a look at it yourselves :-D

@jpommerening
Copy link
Member

jpommerening commented Jan 26, 2018

@deroude sorry this is taking so long!

Hi @alex3683 thanks for jumping in!

I'm still in the process of obtaining a Windows VM to reproduce. All I can say is that it work's on UNIXy systems (duh) :(

Edit: Okay, maybe this will work …

screensharing-xvnc-virtualbox

@alex3683
Copy link
Member

alex3683 commented Jan 27, 2018

@jpommerening
I think I found the cause for this issue. Using path.posix instead of path in laxar-tooling and laxar-loaderleads to paths like C:\\Users\\alexa\\Documents\\projects\\laxarjs\\test-app/application/widgets that are not working. So I assume you assumed path.posix would return a valid posix path from a windows path, which obiously isn't the case ;-) (see nodejs/node#13683).
I changed it to use the default path methods and everything works. So, what's your opinion on this?

@jpommerening
Copy link
Member

jpommerening commented Feb 13, 2018

@alex3683: Okay, this took ridiculously long and I'm sorry for that. I think the line in question was just blindly copied from grunt-laxar. I seem to be unable to work with the Windows box I was given and I'm too much of a cheapskate to buy a Windows license and virtualization solution for myself and my personal notebook doesn't have VTx so what's the use anyway… *keeps on listing excuses*

As long as the tests pass I'd say go for it :shipit:

@alex3683
Copy link
Member

Good that you mentioned grunt-laxar. @x1B added a path implementation to fix problems on windows (https://github.com/LaxarJS/grunt-laxar/blob/master/lib/path-platform/path.js). @x1B , do you think we could fix this issue by simply copying that code to laxar-loader and laxar-tooling?

@jpommerening
Copy link
Member

jpommerening commented Feb 13, 2018 via email

@alex3683
Copy link
Member

Apparently 😸
I'll copy it over ASAP (perhaps this evening) and see, if it fixes the issue.

@alex3683
Copy link
Member

@jpommerening I failed to get it running with the old grunt-laxar stuff. However, it works on windows and on my virtual linux machine when using the default path module and not the posix implementation. Is there anything I'm not aware of that prevents us from using the default module instead of posix?
Otherwise I'd push my "fix".

@jpommerening
Copy link
Member

@alex3683 go for it 🚢

This might actually be a case where our testing approach in laxar-tooling might be helpful :)
If those tests pass on Windows as well, you can release with confidence 👍

@alex3683
Copy link
Member

@jpommerening As you can see I pushed my fixes, but for some reason I cannot publish the npm packages (wish I wanted to do before updating the yo generator). Could you try if you can publish them?

@jpommerening
Copy link
Member

@alex3683: Oh yeah, I think they changed how the permissions work.

I just added a few more packages to the "developers" team so you should give it another try!

Also, you're (co-)owner of the laxarjs org at npm, so you should already be able to assign your user to the relevant teams at https://www.npmjs.com/org/laxarjs/teams using their super-horrible UI.
I had to do the same when I was releasing something else last month.

@jpommerening
Copy link
Member

Good work btw :)

@alex3683
Copy link
Member

alex3683 commented Feb 21, 2018

Okay, successfully published 👍

@deroude Sorry that it took us so long, but up to now our own development environments were only Mac OS X and Linux. Seems that I am the only one having a windows machine that can also be used for development 😄
If you use the generator again to create a new application, it should work now (at least my test was successful). I'll close the issue for now.

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

No branches or pull requests

3 participants