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

Problem Compiling #176

Open
gphummer opened this issue May 24, 2020 · 8 comments
Open

Problem Compiling #176

gphummer opened this issue May 24, 2020 · 8 comments

Comments

@gphummer
Copy link

gphummer commented May 24, 2020

Description of issue:

When I run npm run compile I get an error

Steps to reproduce:

  1. Git clone the repo onto my local computer.
  2. npm install the repo.
  3. npm run compile

Error message:

// Console output:

```~/Documents/Overmind |  (dev) 👾 npm run compile

> [email protected] 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! [email protected] compile: `rollup -c`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
@eiva
Copy link

eiva commented Jun 15, 2020

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.

@Incrediblez7
Copy link

same error with Overmind 0.5.2.

npm: 6.14.5
node: v14.5.0
OS: macOS Big Sur (20A5364e)

@Incrediblez7
Copy link

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 [email protected]
3 info using [email protected]
4 verbose run-script [ 'precompile', 'compile', 'postcompile' ]
5 info lifecycle [email protected]~precompile: [email protected]
6 info lifecycle [email protected]~compile: [email protected]
7 verbose lifecycle [email protected]~compile: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~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 [email protected]~compile: CWD: /Users/mac/Overmind
10 silly lifecycle [email protected]~compile: Args: [ '-c', 'rollup -c' ]
11 silly lifecycle [email protected]~compile: Returned: code: 1  signal: null
12 info lifecycle [email protected]~compile: Failed to exec compile script
13 verbose stack Error: [email protected] 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 [email protected]
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 [email protected] compile: `rollup -c`
22 error Exit status 1
23 error Failed at the [email protected] compile script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@bencbartlett
Copy link
Owner

is this the dev branch? this requires rollup 2 to be installed. see https://github.com/bencbartlett/Overmind/blob/dev/CHANGELOG.md

@Incrediblez7
Copy link

It's the master branch.
[email protected] is installed.

@Nano1237
Copy link

Nano1237 commented Nov 13, 2020

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 :/

@lukemundy
Copy link

I had the same problem on commit 5eca49a and Node 14, once i downgraded to Node 12 though it worked fine.

@kristopher-wood
Copy link

Same issue here, Node 18, Overmind 0.5.2

PS C:\WoodenRobot\Screeps\Overmind> npm run push-main

[email protected] 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

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

7 participants