node.js - how to run script in brackets extension package.json? -
i want run script in brackets extension manager when install extension.
found code in brackets default extension 'javascriptcodehints'.
{ "name": "brackets-javascript-code-hints", "dependencies": { "acorn": "3.3.0", "tern": "0.20.0" }, "scripts": { "postinstall": "node ./fix-acorn" } }
same using "postinstall": "node ./test", displayed error message.
npm-stderr: sh: node: command not found npm warn testextensioninstaller@1.0.1 no description npm warn testextensioninstaller@1.0.1 no repository field. npm warn testextensioninstaller@1.0.1 no license field. npm err! darwin 16.7.0 npm err! argv "/applications/brackets.app/contents/macos/brackets-node" "/applications/brackets.app/contents/www/node_modules/npm/bin/npm-cli.js" "install" "--production" npm err! node v6.3.1 npm err! npm v3.10.9 npm err! file sh npm err! code elifecycle npm err! errno enoent npm err! syscall spawn npm err! testextensioninstaller@1.0.1 postinstall: `node ./test` npm err! spawn enoent npm err! npm err! failed @ testextensioninstaller@1.0.1 postinstall script 'node ./test'. npm err! make sure have latest version of node.js , npm installed. npm err! if do, problem testextensioninstaller package, npm err! not npm itself. npm err! tell author fails on system: npm err! node ./test npm err! can information on how open issue project with: npm err! npm bugs testextensioninstaller npm err! or if isn't available, can info via: npm err! npm owner ls testextensioninstaller npm err! there additional logging output above. npm err! please include following file support request: npm err! /private/var/folders/1y/bd63w8h51wzccq_zbw6804440000gn/t/bracketspackage_117723-46419-zgk6x5.ki3sicc8fr/testextensioninstaller/npm-debug.log
how using node without install nodejs in brackets extension install?
this has nothing brackets, need update filesystem path include node
you need add place installed nodejs (c:\program files\nodejs
) path environment variable. follow these steps:
- use global search charm search "environment variables"
- click "edit system environment variables"
- click "environment variables" in dialog.
- in "system variables" box, search path , edit include
c:\program files\nodejs
. make sure separated other paths;
.
you have restart currently-opened command prompts before take effect.
wiki
Comments
Post a Comment