Node Script Throwing Strange code ELIFECYCLE errno 2 - javascript

In an effort to remove gulp from my project, I'm refactoring all of my scripts into node scripts. This has been largely successful, however, in refactoring my JSHint scripts, I'm running into a peculiar (though largely benign) problem. My script in package.json is:
"jshint-script": "jshint --reporter=tasks/misc_tasks/jshint.js build/ --exclude build-/libs/"
This works absolutely fine when I type it directly into the command line. However, when I run npm run jshint-script, everything runs just fine, but then an error is blown.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! Rosetta#5.0.0 jshint-script:jshint --reporter=tasks/misc_tasks/reporter.js build-ts/ --exclude build/libs/
npm ERR! Exit status 2
the full log is below:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'jshint' ]
2 info using npm#6.9.0
3 info using node#v10.16.0
4 verbose run-script [ 'prejshint', 'jshint', 'postjshint' ]
5 info lifecycle Project#5.0.0~prejshint: Project#5.0.0
6 info lifecycle Project#5.0.0~jshint: Project#5.0.0
7 verbose lifecycle Project#5.0.0~jshint: unsafe-perm in lifecycle true
8 verbose lifecycle Project#5.0.0~jshint: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/user/Documents/Git/Project/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/opt/openssl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/opt/openssl/bin:/Users/user/npm/bin:/Users/user/npm/bin
9 verbose lifecycle Project#5.0.0~jshint: CWD: /Users/user/Documents/Git/Project
10 silly lifecycle Project#5.0.0~jshint: Args: [ '-c',
10 silly lifecycle 'jshint --reporter=tasks/misc_tasks/jshint.js build/ --exclude build/libs/' ]
11 silly lifecycle Project#5.0.0~jshint: Returned: code: 2 signal: null
12 info lifecycle Project#5.0.0~jshint: Failed to exec jshint script
13 verbose stack Error: Project#5.0.0 jshint:jshint --reporter=tasks/misc_tasks/jshint.js build/ --exclude build/libs/
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
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:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid Project#5.0.0
15 verbose cwd /Users/user/Documents/Git/Project
16 verbose Darwin 18.2.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "jshint"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 2
22 error Project#5.0.0 jshint:jshint --reporter=tasks/misc_tasks/jshint.js build/ --exclude build/libs/
22 error Exit status 2
23 error Failed at the Project#5.0.0 jshint script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

Related

ERR! code building for production in Vue with npm run build

Couldn't find any solution that worked online so asking here, I am a bit of a noob in web development and using npm and such.
Log:
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:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm#6.14.13
3 info using node#v14.17.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle vue-crash#0.1.0~prebuild: vue-crash#0.1.0
6 info lifecycle vue-crash#0.1.0~build: vue-crash#0.1.0
7 verbose lifecycle vue-crash#0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle vue-crash#0.1.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\D_Documents\Web_dev\vue-crash\node_modules\.bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\D_Programs\Git\cmd;C:\Program Files (x86)\dotnet\;C:\ffmpeg\bin;C:\Program Files\Tesseract-OCR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Users\peter\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\peter\AppData\Local\Programs\Python\Python38-32\;C:\Users\peter\AppData\Local\Microsoft\WindowsApps;D:\D_Programs\MikTeX\miktex\bin\x64\;C:\Users\peter\AppData\Local\Programs\Microsoft VS Code\bin;C:\ffmpeg\bin;C:\Users\peter\AppData\Roaming\Amazon;C:\Program Files\Unity\Hub\Editor\2019.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin;C:\Users\peter\AppData\Roaming\npm
9 verbose lifecycle vue-crash#0.1.0~build: CWD: D:\D_Documents\Web_dev\vue-crash
10 silly lifecycle vue-crash#0.1.0~build: Args: [ '/d /s /c', 'vue-cli-service build' ]
11 silly lifecycle vue-crash#0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle vue-crash#0.1.0~build: Failed to exec build script
13 verbose stack Error: vue-crash#0.1.0 build: `vue-cli-service build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:376:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:376:20)
13 verbose stack at maybeClose (internal/child_process.js:1055:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid vue-crash#0.1.0
15 verbose cwd D:\D_Documents\Web_dev\vue-crash
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v14.17.0
19 verbose npm v6.14.13
20 error code ELIFECYCLE
21 error errno 1
22 error vue-crash#0.1.0 build: `vue-cli-service build`
22 error Exit status 1
23 error Failed at the vue-crash#0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
npm --versions :
npm: '6.14.13',
ares: '1.17.1',
brotli: '1.0.9',
cldr: '38.1',
icu: '68.2',
llhttp: '2.1.3',
modules: '83',
napi: '8',
nghttp2: '1.42.0',
node: '14.17.0',
openssl: '1.1.1k',
tz: '2020d',
unicode: '13.0',
uv: '1.41.0',
v8: '8.4.371.23-node.63',
zlib: '1.2.11'
Already tried deleting node_modules and package-lock.json and running npm install. If you have any idea it would be greatly appreciated since I have no idea where to start.

can't run react scripts

npm log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm#6.12.0
3 info using node#v10.16.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle learny-frontend#0.1.0~prestart: learny-frontend#0.1.0
6 info lifecycle learny-frontend#0.1.0~start: learny-frontend#0.1.0
7 verbose lifecycle learny-frontend#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle learny-frontend#0.1.0~start:
PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp- bin:/Users/hassnianidrees/Desktop/projects/learny-
frontEnd/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/usr/local /share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Command s:/Library/Frameworks/Python.framework/Versions/3.7/bin
9 verbose lifecycle learny-frontend#0.1.0~start: CWD: /Users/hassnianidrees/Desktop/projects/learny-frontEnd
10 silly lifecycle learny-frontend#0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle learny-frontend#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle learny-frontend#0.1.0~start: Failed to exec start script
13 verbose stack Error: learny-frontend#0.1.0 start: `react-scripts start`
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:198:13)
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:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid learny-frontend#0.1.0
15 verbose cwd /Users/hassnianidrees/Desktop/projects/learny-frontEnd
16 verbose Darwin 19.0.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v10.16.3
19 verbose npm v6.12.0
20 error code ELIFECYCLE
21 error errno 1
22 error learny-frontend#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the learny-frontend#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
T'm trying to install this project and i'm getting this error i'm pretty sure that the project is ok bcz it worked when I did make the commit.
Try to use YARN package manger.
Yarn installations procedure - Link
then install the package using it

I cannot run my React JS app with npm from my terminal because the command spawn fails with error ENOENT

Disclaimer before reading: I am new to coding so I hope that I won't be judged too harshly. Anyway, this is what happens right after I run npm-start from my react application root directory:
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
I tried resetting my path variables to point to npm on my windows 7 machine, and still no luck. I've additionally tried reinstalling npm in my react project root and re-configuring my react-scripts dev dependency in the package.json file. Additionally, I've tested this with yarn start, and it still does not work.
Below is a full error log from Users/MyName/AppData/Roaming/npm-cache/some-text-file-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Mara\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#6.5.0
3 info using node#v10.15.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle app-one#0.1.0~prestart: app-one#0.1.0
6 info lifecycle app-one#0.1.0~start: app-one#0.1.0
7 verbose lifecycle app-one#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle app-one#0.1.0~start: PATH: C:\Users\Mara\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Mara\documents\myprograms\app-one\node_modules\.bin;C:\Users\Mara\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Mara\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\C;C:\Program Files\Git\Program Files\Java\jdk1.8.0_144\bin\C;C:\Program Files\Git\Program Files (x86)\Skype\Phone;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\MongoDB\Server\3.4\bin;C:\Program Files (x86)\Yarn\bin;C:\Program Files\Lenovo\Fingerprint Manager Pro;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\php;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\nodejs;C:\Users\Mara\AppData\Local\Programs\Python\Python37\Scripts;C:\Users\Mara\AppData\Local\Programs\Python\Python37;C:\Ruby25-x64\bin;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Users\Mara\AppData\Local\atom\bin;C:\Users\Mara\Downloads\python-3.7.3.exe;C:\C;C:\Program Files\Git\Program Files\Heroku\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Mara\AppData\Local\Yarn\bin;C:\Ruby\bin;C\php;C\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\Mara\AppData\Roaming\npm;C:\Users\Mara\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle app-one#0.1.0~start: CWD: C:\Users\Mara\documents\myprograms\app-one
10 silly lifecycle app-one#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle app-one#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle app-one#0.1.0~start: Failed to exec start script
13 verbose stack Error: app-one#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Mara\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Mara\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid app-one#0.1.0
15 verbose cwd C:\Users\Mara\documents\myprograms\app-one
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Mara\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v10.15.0
19 verbose npm v6.5.0
20 error code ELIFECYCLE
21 error errno 1
22 error app-one#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the app-one#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]```
It seems the task is trying to call require('child_process'). spawn directly since Windows requires a file extension in order for Node.js to spawn the binary. In this case, you can refer to npm-execspawn for more information.
Also, refer to this post

Resolve 'eslint' error inside index.js - Angular 5

I'm getting an eslint error when I attempt to deploy my Angular functions. I've determined that the issue is contained within a code snippet found in this article: https://medium.com/#markgoho/create-a-contact-form-in-angular-using-cloud-functions-for-firebase-5e390bdf5600
Here's the snippet I grabbed from the article and placed into my index.js file:
exports.sendContactMessage = functions.database.ref('/messages/{pushKey}').onWrite(event => {
const snapshot = event.data;
// Only send email for new messages.
if (snapshot.previous.val() || !snapshot.val().name) {
return;
}
const val = snapshot.val();
const mailOptions = {
to: 'test#example.com',
subject: `Information Request from ${val.name}`,
html: val.html
};
return mailTransport.sendMail(mailOptions).then(() => {
return console.log('Mail sent to: test#example.com')
});
});
Here's the full error output:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli '--prefix',
1 verbose cli '/Users/kwlester/Documents/JurassicRevenge/commonwealthlinen/functions',
1 verbose cli 'run',
1 verbose cli 'lint' ]
2 info using npm#4.5.0
3 info using node#v6.10.2
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle functions#~prelint: functions#
6 silly lifecycle functions#~prelint: no script for prelint, continuing
7 info lifecycle functions#~lint: functions#
8 verbose lifecycle functions#~lint: unsafe-perm in lifecycle true
9 verbose lifecycle functions#~lint: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/kwlester/Documents/JurassicRevenge/commonwealthlinen/functions/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle functions#~lint: CWD: /Users/kwlester/Documents/JurassicRevenge/commonwealthlinen/functions
11 silly lifecycle functions#~lint: Args: [ '-c', 'eslint .' ]
12 silly lifecycle functions#~lint: Returned: code: 1 signal: null
13 info lifecycle functions#~lint: Failed to exec lint script
14 verbose stack Error: functions# lint: `eslint .`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:886:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid functions#
16 verbose cwd /Users/kwlester/Documents/JurassicRevenge/commonwealthlinen
17 verbose Darwin 17.4.0
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "--prefix" "/Users/kwlester/Documents/JurassicRevenge/commonwealthlinen/functions" "run" "lint"
19 verbose node v6.10.2
20 verbose npm v4.5.0
21 error code ELIFECYCLE
22 error errno 1
23 error functions# lint: `eslint .`
23 error Exit status 1
24 error Failed at the functions# lint script 'eslint .'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the functions package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error eslint .
24 error You can get information on how to open an issue for this project with:
24 error npm bugs functions
24 error Or if that isn't available, you can get their info via:
24 error npm owner ls functions
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]
When I remove the 3rd party snippet, the error goes away.
I have very limited Javascript knowledge, so I'm having trouble finding where the issue lies. How do I solve this?
The log suggests you verify your running the latest node and npm. If you are on windows the node install will also install the latest npm. I would suggest giving that a go first.
Log suggests here:
Make sure you have the latest version of node.js and npm installed.
Looks like it mentions you are using node v6.10.2 and the latest is currently v9.5.0

TypeError: React.renderToStaticMarkup is not a function

I am following this tutorial "Building SVG Icons with React"
http://jxnblk.com/react-icons/
I am getting stuck when i am running the command "npm run build"
This is the npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/Users/villat/.nvm/versions/node/v5.0.0/bin/node',
1 verbose cli '/Users/villat/.nvm/versions/node/v5.0.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm#3.3.6
3 info using node#v5.0.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle react-icons#1.0.0~prebuild: react-icons#1.0.0
6 silly lifecycle react-icons#1.0.0~prebuild: no script for prebuild, continuing
7 info lifecycle react-icons#1.0.0~build: react-icons#1.0.0
8 verbose lifecycle react-icons#1.0.0~build: unsafe-perm in lifecycle true
9 verbose lifecycle react-icons#1.0.0~build: PATH: /Users/villat/.nvm/versions/node/v5.0.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/villat/Downloads/Projects/react-icons/node_modules/.bin:/Users/villat/.nvm/versions/node/v5.0.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle react-icons#1.0.0~build: CWD: /Users/villat/Downloads/Projects/react-icons
11 silly lifecycle react-icons#1.0.0~build: Args: [ '-c', 'node build' ]
12 silly lifecycle react-icons#1.0.0~build: Returned: code: 1 signal: null
13 info lifecycle react-icons#1.0.0~build: Failed to exec build script
14 verbose stack Error: react-icons#1.0.0 build: `node build`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/Users/villat/.nvm/versions/node/v5.0.0/lib/node_modules/npm/lib/utils/lifecycle.js:233:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (/Users/villat/.nvm/versions/node/v5.0.0/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:818:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid react-icons#1.0.0
16 verbose cwd /Users/villat/Downloads/Projects/react-icons
17 error Darwin 15.4.0
18 error argv "/Users/villat/.nvm/versions/node/v5.0.0/bin/node" "/Users/villat/.nvm/versions/node/v5.0.0/bin/npm" "run" "build"
19 error node v5.0.0
20 error npm v3.3.6
21 error code ELIFECYCLE
22 error react-icons#1.0.0 build: `node build`
22 error Exit status 1
23 error Failed at the react-icons#1.0.0 build script 'node build'.
23 error This is most likely a problem with the react-icons package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node build
23 error You can get their info via:
23 error npm owner ls react-icons
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
In attached my terminal screenshot where it is complaining about React.renderToStaticMarkup
I have done a bit of research and i have not found any relevant solution for me
I am using nvm to manage the node versions
My node -v version is 5.0.0
renderToStaticMarkup has moved to react-dom/server.
http://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostaticmarkup
You need to install react-dom.
npm install react-dom
And use it.
var ReactDOMServer = require('react-dom/server');
ReactDOMServer.renderToStaticMarkup(<div />);

Categories

Resources