Problem Compiling
gphummer opened this issue · 8 comments
Description of issue:
When I run npm run compile I get an error
Steps to reproduce:
- Git clone the repo onto my local computer.
npm installthe repo.npm run compile
Error message:
// Console output:
```~/Documents/Overmind | (dev) 👾 npm run compile
> Overmind@0.6.0 compile /Users/granthummer/Documents/Overmind
> rollup -c
Compiling Overmind... (deploy destination: none)
[!] TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (0)
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (0)
at Object.writeFileSync (fs.js:1380:5)
at progress (/Users/granthummer/Documents/Overmind/node_modules/rollup-plugin-progress/dist/rollup-plugin-progress.js:25:8)
at Object.<anonymous> (/Users/granthummer/Documents/Overmind/rollup.config.js:35:9)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.require.extensions.<computed> [as .js] (/Users/granthummer/Documents/Overmind/node_modules/rollup/dist/shared/loadConfigFile.js:516:20)
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 (internal/modules/cjs/helpers.js:73:18)
at loadConfigFromBundledFile (/Users/granthummer/Documents/Overmind/node_modules/rollup/dist/shared/loadConfigFile.js:524:42)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Overmind@0.6.0 compile: `rollup -c`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Overmind@0.6.0 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/granthummer/.npm/_logs/2020-05-24T23_08_00_915Z-debug.log
Suggested fix (optional):
No idea
Other information:
- Overmind version: 0.6.0
Latest dev branch
How did you get to this point? I tried to install it and run into massive dump of cpp errors...
What is your setup? Node, npm?
Thanks.
same error with Overmind 0.5.2.
npm: 6.14.5
node: v14.5.0
OS: macOS Big Sur (20A5364e)
debug.log:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/Cellar/node/14.5.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.14.5
3 info using node@v14.5.0
4 verbose run-script [ 'precompile', 'compile', 'postcompile' ]
5 info lifecycle Overmind@0.5.2~precompile: Overmind@0.5.2
6 info lifecycle Overmind@0.5.2~compile: Overmind@0.5.2
7 verbose lifecycle Overmind@0.5.2~compile: unsafe-perm in lifecycle true
8 verbose lifecycle Overmind@0.5.2~compile: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/mac/Overmind/node_modules/.bin:/usr/local/opt/libiconv/bin:/Users/mac/.pyenv/shims:/Users/mac/.cargo/bin:/opt/local/bin:/opt/local/sbin:/usr/local/opt/mysql-client/bin:/usr/local/opt/curl/bin:/usr/local/opt/curl/bin:/usr/local/sbin:/usr/local/opt/openssl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
9 verbose lifecycle Overmind@0.5.2~compile: CWD: /Users/mac/Overmind
10 silly lifecycle Overmind@0.5.2~compile: Args: [ '-c', 'rollup -c' ]
11 silly lifecycle Overmind@0.5.2~compile: Returned: code: 1 signal: null
12 info lifecycle Overmind@0.5.2~compile: Failed to exec compile script
13 verbose stack Error: Overmind@0.5.2 compile: `rollup -c`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1051:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid Overmind@0.5.2
15 verbose cwd /Users/mac/Overmind
16 verbose Darwin 20.1.0
17 verbose argv "/usr/local/Cellar/node/14.5.0/bin/node" "/usr/local/bin/npm" "run" "compile"
18 verbose node v14.5.0
19 verbose npm v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error Overmind@0.5.2 compile: `rollup -c`
22 error Exit status 1
23 error Failed at the Overmind@0.5.2 compile script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
is this the dev branch? this requires rollup 2 to be installed. see https://github.com/bencbartlett/Overmind/blob/dev/CHANGELOG.md
It's the master branch.
rollup@0.62.0 is installed.
You have to use the compile Script instead of the build Script. Had the same problem ...
Hope that solves your issue
Edit: Sorry, just saw that you already used the compile script :/
I had the same problem on commit 5eca49a and Node 14, once i downgraded to Node 12 though it worked fine.
Same issue here, Node 18, Overmind 0.5.2
PS C:\WoodenRobot\Screeps\Overmind> npm run push-main
Overmind@0.5.2 push-main
rollup -c --environment DEST:main
Compiling Overmind... (deploy destination: main)
[!] TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (0)
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (0)
at Object.writeFileSync (node:fs:2314:5)
at progress (C:\WoodenRobot\Screeps\Overmind\node_modules\rollup-plugin-progress\dist\rollup-plugin-progress.js:28:8)
at Object. (C:\WoodenRobot\Screeps\Overmind\rollup.config.js:30:9)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at require.extensions..js (C:\WoodenRobot\Screeps\Overmind\node_modules\rollup\bin\rollup:3015:24)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:121:18)
at C:\WoodenRobot\Screeps\Overmind\node_modules\rollup\bin\rollup:3022:32