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

Upgrade dependencies #231

Merged
merged 4 commits into from
Jul 7, 2020
Merged

Upgrade dependencies #231

merged 4 commits into from
Jul 7, 2020

Conversation

jaller94
Copy link
Contributor

@jaller94 jaller94 commented Jun 30, 2020

The current master was not building for me anymore.

This PR wants to upgrade all packages. With these upgrades, Klaro successfully builds on my machine using npm run make and npm run make-dev.

Previous build error

> klaro@0.3.3 make /home/jaller94/Git/github/klaro
> cross-env APP_ENV=production cross-env APP_VERSION=$(git tag --points-at HEAD) cross-env APP_COMMIT=$(git rev-parse HEAD) webpack --config webpack.config.js

Hash: b2edcc72f3ffb9c8c507
Version: webpack 4.41.5
Time: 655ms
Built at: 06/30/2020 9:51:01 AM
 1 asset
Entrypoint main = klaro.js
[0] multi ./klaro.js 28 bytes {0} [built]
[1] ./klaro.js 3.34 KiB {0} [built] [failed] [1 error]

ERROR in ./klaro.js
Module build failed (from ../node_modules/babel-loader/lib/index.js):
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /home/jaller94/Git/github/klaro/node_modules/@babel/helper-compilation-targets/package.json
    at applyExports (internal/modules/cjs/loader.js:497:9)
    at resolveExports (internal/modules/cjs/loader.js:513:23)
    at Function.Module._findPath (internal/modules/cjs/loader.js:641:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1016:27)
    at Function.Module._load (internal/modules/cjs/loader.js:898:27)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (/home/jaller94/Git/github/klaro/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/jaller94/Git/github/klaro/node_modules/@babel/preset-env/lib/debug.js:8:33)
    at Module._compile (/home/jaller94/Git/github/klaro/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (/home/jaller94/Git/github/klaro/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/jaller94/Git/github/klaro/node_modules/@babel/preset-env/lib/index.js:11:14)
    at Module._compile (/home/jaller94/Git/github/klaro/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (/home/jaller94/Git/github/klaro/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at requireModule (/home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/files/plugins.js:165:12)
    at loadPreset (/home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/files/plugins.js:83:17)
    at createDescriptor (/home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/config-descriptors.js:154:9)
    at /home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/config-descriptors.js:109:50
    at Array.map (<anonymous>)
    at createDescriptors (/home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
    at createPresetDescriptors (/home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/config-descriptors.js:101:10)
    at presets (/home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/config-descriptors.js:47:19)
    at mergeChainOpts (/home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/config-chain.js:320:26)
    at /home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/config-chain.js:283:7
    at Generator.next (<anonymous>)
    at buildRootChain (/home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/config-chain.js:90:27)
    at buildRootChain.next (<anonymous>)
    at loadPrivatePartialConfig (/home/jaller94/Git/github/klaro/node_modules/@babel/core/lib/config/partial.js:95:62)
    at loadPrivatePartialConfig.next (<anonymous>)
 @ multi ./klaro.js main[0]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! klaro@0.3.3 make: `cross-env APP_ENV=production cross-env APP_VERSION=$(git tag --points-at HEAD) cross-env APP_COMMIT=$(git rev-parse HEAD) webpack --config webpack.config.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the klaro@0.3.3 make script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@jaller94 jaller94 requested a review from adewes June 30, 2020 08:10
@syriaca
Copy link
Contributor

syriaca commented Jul 3, 2020

I still have the problem when i update the package... i'm not sure it comes from there.

@jaller94
Copy link
Contributor Author

jaller94 commented Jul 3, 2020

Have you tried deleting the node_modules folder?
npm ci removes node_modules first and then installs exactly the versions specified in package-lock.json.

@syriaca
Copy link
Contributor

syriaca commented Jul 4, 2020

Have you tried deleting the node_modules folder?
npm ci removes node_modules first and then installs exactly the versions specified in package-lock.json.

Yes, I exactly did that multiple times... i'll try again, it is very blocking for me right now...

@syriaca
Copy link
Contributor

syriaca commented Jul 5, 2020

@jaller94 Hello, I still have the issue despite trying the method npm ci... I don't get it... that's very embarassing for me so that i must make my own fork of the library for my working company...

@jaller94
Copy link
Contributor Author

jaller94 commented Jul 5, 2020

Which dependency errors for you?
I once again upgraded all dependencies.

@syriaca
Copy link
Contributor

syriaca commented Jul 5, 2020

Hello again @jaller94 , this is the error stack i got:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'make'
1 verbose cli ]
2 info using npm@6.13.1
3 info using node@v12.13.1
4 verbose run-script [ 'premake', 'make', 'postmake' ]
5 info lifecycle klaro@0.3.3~premake: klaro@0.3.3
6 info lifecycle klaro@0.3.3~make: klaro@0.3.3
7 verbose lifecycle klaro@0.3.3~make: unsafe-perm in lifecycle true
8 verbose lifecycle klaro@0.3.3~make: PATH: C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Admin\Documents\Personnal code\klaro\klaro\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\PuTTY\;C:\Users\Admin\apache-maven-3.5.4\bin;C:\Program Files\Java\jre1.8.0_181\bin;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\ProgramData\chocolatey\bin;C:\Program Files\KDiff3;C:\Program Files\Git\cmd;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\nodejs\;C:\Users\Admin\AppData\Roaming\npm\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\Admin\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\.bin;C:\Users\Admin\.windows-build-tools\python27\;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Admin\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\.bin;C:\Users\Admin\AppData\Roaming\npm\node_modules\.bin;C:\Program Files\ConEmu\ConEmu\Scripts;C:\Program Files\ConEmu;C:\Program Files\ConEmu\ConEmu;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\Wi
9 verbose lifecycle klaro@0.3.3~make: CWD: C:\Users\Admin\Documents\Personnal code\klaro\klaro
10 silly lifecycle klaro@0.3.3~make: Args: [
10 silly lifecycle   '/d /s /c',
10 silly lifecycle   'cross-env APP_ENV=production cross-env APP_VERSION=$(git tag --points-at HEAD) cross-env APP_COMMIT=$(git rev-parse HEAD) webpack --config webpack.config.js'
10 silly lifecycle ]
11 silly lifecycle klaro@0.3.3~make: Returned: code: 1  signal: null
12 info lifecycle klaro@0.3.3~make: Failed to exec make script
13 verbose stack Error: klaro@0.3.3 make: `cross-env APP_ENV=production cross-env APP_VERSION=$(git tag --points-at HEAD) cross-env APP_COMMIT=$(git rev-parse HEAD) webpack --config webpack.config.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:210:5)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:210:5)
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 klaro@0.3.3
15 verbose cwd C:\Users\Admin\Documents\Personnal code\klaro\klaro
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "make"
18 verbose node v12.13.1
19 verbose npm  v6.13.1
20 error code ELIFECYCLE
21 error errno 1
22 error klaro@0.3.3 make: `cross-env APP_ENV=production cross-env APP_VERSION=$(git tag --points-at HEAD) cross-env APP_COMMIT=$(git rev-parse HEAD) webpack --config webpack.config.js`
22 error Exit status 1
23 error Failed at the klaro@0.3.3 make script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

If i remove the following in the script of my package.json file, it builds:

APP_VERSION=$(git tag --points-at HEAD) and APP_COMMIT=$(git rev-parse HEAD)

The problem seems to come from tag and rev-parse

@adewes
Copy link
Contributor

adewes commented Jul 7, 2020

Thanks @jaller94 !

@adewes adewes merged commit 2348d65 into master Jul 7, 2020
@syriaca
Copy link
Contributor

syriaca commented Jul 7, 2020

Hello @adewes , I see you merged that PR.

I tried again to get the project building using "npm run make-dev", but i'm still having the issue concerning my latest comment...

If i remove the following in the script of my package.json file, it builds:

APP_VERSION=$(git tag --points-at HEAD) and APP_COMMIT=$(git rev-parse HEAD)

The problem seems to come from tag and rev-parse

Am I the only one getting that error ?

@adewes
Copy link
Contributor

adewes commented Jul 7, 2020

Hi @syriaca , I see you're trying to compile this on a Windows machine? I can't give much advice there other than upgrading your node version, to be honest I can't even figure out the exact problem from the build log.

If it's possible I would try to compile Klaro in a Linux environment. If you're on Windows you could e.g. use the Windows Subsystem for Linux (WSL), which offers Debian and Ubuntu distributions that you can use.

@adewes
Copy link
Contributor

adewes commented Jul 7, 2020

npm make-dev works fine in my environment btw (Ubuntu 20.04, Node 12.16.1).

@jaller94 jaller94 deleted the upgrade-dependencies branch July 7, 2020 14:05
@syriaca
Copy link
Contributor

syriaca commented Jul 7, 2020

Hello. Thanks for your answer @adewes (and thanks for your try).

I was thinking about updating my node environement, i'll tell you if that works.

@syriaca
Copy link
Contributor

syriaca commented Jul 7, 2020

@adewes Problem still there despite my git, node and npm update..... i'm sure it comes from those command lines:
APP_VERSION=$(git tag --points-at HEAD) and APP_COMMIT=$(git rev-parse HEAD)

It would be good to be sure the problem is not permanent for windows users...

@jaller94, are you running on macOS ?

@adewes
Copy link
Contributor

adewes commented Jul 7, 2020

Do you have a working git installation? It seems git might not be set up or might not be callable from the node environment.

@adewes
Copy link
Contributor

adewes commented Jul 7, 2020

You can try to type git tag --points-at HEAD in the terminal, if that doesn't work you have found your problem.

@jaller94
Copy link
Contributor Author

jaller94 commented Jul 7, 2020

I'm using Linux.
I think the issue here is that Windows' cmd doesn't support command substitution (VAR=$(echo "hi")), even with cross-env.

There is a way to make PowerShell support this though: kentcdodds/cross-env#192 (comment)

@syriaca
Copy link
Contributor

syriaca commented Jul 8, 2020

@adewes @jaller94 ok, the problem seems to be gone... think that all the update i've made (git, npm and node) finished to resolve the problem. Thanks for your time and sorry having bothered you !

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

Successfully merging this pull request may close these issues.

3 participants