I am getting the following error while trying to setup my node.js server. I am using the latest version of noflo and node.js. Is anyone else seeing this behaviour for NoFlo on Windows?
Here is the command and error:
*C:\Users\Johan\Source\Repos\HelloNoFlow>node node_modules.bin\noflo-nodejs-init --help
C:\Users\Johan\Source\Repos\HelloNoFlow\node_modules\.bin\noflo-nodejs-init:2 basedir=`dirname "$0"`*
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
I believe you're following this guide - which has wrong instructions on the execution.
This works for me on Windows:
.\node_modules\.bin\noflo-nodejs-init --help"
This is because the target is a shell script instead of Javascript. Executing node <shell script> is not going to work.
Note: The same should apply to starting "noflo-nodejs".
UPDATES (19/2/17)
The guide link has changed to https://docs.flowhub.io/getting-started-node
I no longer work on the project that uses noflo, but I find that the script has been converted to CoffeeScript. So this workaround might not be needed anymore
Related
I am new to Bubblewrap. I downloaded Node.js and then did npm i -g #bubblewrap/cli. It threw some warnings, but it did finish.
After this, when I am doing bubblewrap init --manifest https://beegle.app/bpro-manifest.json, I am getting some errors which I don't understand and don't know how to solve.
Here are the error messages:
[Mukeshs-MacBook-Air:beeglepro-bubblewrap mghatiya$ bubblewrap init --manifest https://beegle.app/bpro-manifest.json
internal/util.js:206
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
^
TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
at promisify (internal/util.js:206:11)
at Object.<anonymous> (/Users/mghatiya/.nvm/versions/node/v8.9.3/lib/node_modules/#bubblewrap/cli/node_modules/get-stream/index.js:7:35)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/mghatiya/.nvm/versions/node/v8.9.3/lib/node_modules/#bubblewrap/cli/node_modules/fetch-h2/dist/lib/body.js:6:22)
What is going wrong?
It looks like I had old version of Node.js installed and for whatever reason, even though I had just downloaded Node.js from the website, the latest one was not loaded or it was not loaded at the correct place or whatever.
So basically warnings thrown by npm i -g #bubblewrap/cli were indeed strong ones and it had not completed its job.
I upgraded to the latest Node.js version with nvm install node --reinstall-packages-from=node and now the errors that I posted have gone in the bubblewrap init action.
Of course, as is the case with all development things, now I face the new errors and warnings.
I was using Windows with npm in version 8.16.2 (nvm). Thanks #mukesh for pointing that point. Following nvm list and nvm use 14.18.0, I reinstalled bubblewrap and the bubblewrap init command worked this time.
I am attempting to create a nuxt app in the command line, going to build a Vue web app running off this and Vuetify. I am not sure what I am doing wrong but I run the exact scaffolding command that the docs tell me to run and it errors out everytime with this message.
PS C:\users\gman\documents\github> npx create-nuxt-app myappname
create-nuxt-app v2.15.0
✨ Generating Nuxt.js project in myappname
Trace: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: C:\Users\GMan\AppData\Roaming\npm-cache\_npx\23248\node_modules\create-nuxt-app\node_modules\is-promise\index.js
require() of ES modules is not supported.
require() of C:\Users\GMan\AppData\Roaming\npm-cache\_npx\23248\node_modules\create-nuxt-app\node_modules\is-promise\index.js from C:\Users\GMan\AppData\Roaming\npm-cache\_npx\23248\node_modules\create-nuxt-app\node_modules\run-async\index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename C:\Users\GMan\AppData\Roaming\npm-cache\_npx\23248\node_modules\create-nuxt-app\node_modules\is-promise\index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from C:\Users\GMan\AppData\Roaming\npm-cache\_npx\23248\node_modules\create-nuxt-app\node_modules\is-promise\package.json.
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1172:13)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (C:\Users\GMan\AppData\Roaming\npm-cache\_npx\23248\node_modules\create-nuxt-app\node_modules\run-async\index.js:3:17)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14) {
code: 'ERR_REQUIRE_ESM'
}
at C:\Users\GMan\AppData\Roaming\npm-cache\_npx\23248\node_modules\create-nuxt-app\cli.js:46:17
Has anyone else run into this, google searching is turning up nothing, figure I would check here to see if anyone know what might be up.
Thanks!
I determined that is-promise pushed a commit 2 hours ago that broke.
They are fixing it sounds like.
I am trying to set up a CI for my project team. I am pushing an angular/node project to a git repo in Team Services. The build triggers fine until it hits the gulp task. Before that gulp task run steps 1-3:
1. npm config set cache C:\Dev\nodejs\npm-cache --global
2. npm install
3. npm cache clean
**4. gulp default**
5. deploy to azure
The reasons for steps 1 & 2 is because npm install was failing until i set the cache.
my error output:
2016-04-28T17:51:21.0694993Z [command]C:\NPM\Modules\gulp.cmd default --gulpfile C:\a\1\s\PolicyUI\PolicyUI\gulpfile.js --packagePath=C:\a\1\a
2016-04-28T17:51:25.1707118Z module.js:338
2016-04-28T17:51:25.1707118Z throw err;
2016-04-28T17:51:25.1717126Z ^
2016-04-28T17:51:25.1717126Z Error: Cannot find module 'merge-stream'
2016-04-28T17:51:25.1717126Z at Function.Module._resolveFilename (module.js:336:15)
2016-04-28T17:51:25.1727127Z at Function.Module._load (module.js:278:25)
2016-04-28T17:51:25.1727127Z at Module.require (module.js:365:17)
2016-04-28T17:51:25.1738110Z at require (module.js:384:17)
2016-04-28T17:51:25.1747120Z at Object.<anonymous> (C:\a\1\s\PolicyUI\PolicyUI\gulpfile.js:8:13)
2016-04-28T17:51:25.1747120Z at Module._compile (module.js:460:26)
2016-04-28T17:51:25.1757124Z at Object.Module._extensions..js (module.js:478:10)
2016-04-28T17:51:25.1757124Z at Module.load (module.js:355:32)
2016-04-28T17:51:25.1767126Z at Function.Module._load (module.js:310:12)
2016-04-28T17:51:25.1767126Z at Module.require (module.js:365:17)
merge-stream IS there locally and works fine on my machine.
Does anyone know why this fails???
Whenever a build happens in team services, is that an isolated powershell environment where it is building??
We had a similar issue in our team. We had to modify the powershell script manually to point to the right location of the gulp file. There were some path issues in the default script provided. Please look into it and you may find some answers.
Thank you.
I'm attempting to use the React Starter Kit with SemanticUI on Windows. I can install and build RSK, but when I run npm install semantic-ui and go through the set up, I always hit the same module error and I am unsure how to solve it.
gulp build
module.js:341
throw err;
^
Error: Cannot find module 'inflight'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (C:\Users\Alex\AppData\Roaming\npm\node_modules\gulp\node_modules\glob\glob.js:57:16)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
I have tried nuking the directory and reinstalling multiple times, but I am unable to get this to work. What is causing the issue?
You may be hitting the same issues people are having on npm 2701. The issue appears to be related to version updates between installing NPM modules (from a quick read over the later parts of the report). Suggestions include running:
npm set registry https://registry.npmjs.org/
And alternatively, removing all currently installed node modules including globally installed modules (in /usr/node-modules/ or C:\Program Files\nodejs\node_modules for example). The user deleted them manually (i.e. not using npm).
I also faced same issue while running react app. I simply installed it
npm install inflight
Although after it there prompt another error msg which was failed to find moudule 'source-list-map' then I installed it as well
npm install source-list-map
I hope it will help you
I download the dojo source with the themes and compiler and i tried to compile it using node.js
and followed the instruction below, but was unable to compile it in pc environment?
Can some help?
http://davidwalsh.name/dijit-theme
http://nodejs.org/#
C:\Downloads\dojo-release-1.7.3-src\dojo-release-1.7.3-src\dijit\themes\claro>node compile.js
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
at Function.Module._compile.Object.defineProperty.get (module.js:386:11)
at Object.<anonymous> (C:\Downloads\dojo-release-1.7.3-src\dojo-release-1.7.3-src\util\less\ind
ex.js:5:8)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (C:\Downloads\dojo-release-1.7.3-src\dojo-release-1.7.3-src\dijit\themes\
claro\compile.js:8:9)
at Module._compile (module.js:449:26)
It looks like you're using an outdated version of LESS with a newer version of node.
dojo-release-1.7.3-src comes bundled with LESS 1.1.3, released early 2011.
Replace util/less with a more recent version of LESS.
Alternatively, all compile.js is doing is running the LESS parser against all of the LESS files in the theme directory. You could install the LESS command line tools (npm install -g less) and invoke lessc on the LESS files manually.