Unable to run (gulp serve) Google Polymer Starter Kit v1.1.0 on Windows - node.js

I need help please!
I have been able to effortlessly install and run all previous versions of the PSK. I have spent hours now trying to get 1.1.0 to run in my environment. I have done everything I can think of. From googling the error to reviewing all current issues with this version here. Any of the suggested fixes dont work for me.
I have made no code changes and I am running CMD as the Admin.
When I grab a fresh copy of the repository and do the NPM & Bower installs, then run "gulp serve" I get the following error no matter what:
C:\FrontEnd\polymer-starter-kit>gulp serve
[09:45:33] Using gulpfile C:\FrontEnd\polymer-starter-kit\gulpfile.js
[09:45:33] Starting 'styles'...
[09:45:33] Starting 'elements'...
[09:45:33] Starting 'images'...
[09:45:33] Finished 'elements' after 249 ms
[09:45:33] styles all files 98 B
[09:45:33] Finished 'styles' after 590 ms
[09:45:34] images all files 35.41 kB
[09:45:34] Finished 'images' after 357 ms
[09:45:34] Starting 'serve'...
[09:45:34] Finished 'serve' after 73 ms
[PSK] Access URLs:
------------------------------------
Local: http://localhost:5000
External: http://xxx.xxx.x.x:5000
------------------------------------
UI: http://localhost:3001
UI External: http://xxx.xxx.x.x:3001
------------------------------------
[PSK] Serving files from: .tmp
[PSK] Serving files from: app
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at exports._errnoException (util.js:837:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:429:9)
at process._tickCallback (node.js:343:17)
My Environment:
All Required Prerequisites
Windows 10
Node.js v4.1.1
NPM v3.3.4
Bower v1.5.3
I am also not sure how to get a more detailed stack trace.
What should I do?
Thanks for the help!

It turns out I needed to add C:\Windows\System32 to my PATH vars. So strange. When I did that everything work like a charm.

Related

node error when calling "yarn start" in an app created by create-react-app

I recently created a new project with create-react-app, installed all newest packages for an old create-react-app project (which was using react-scripts 3.4.1, and the new project is using 5.0.0) and copied the old code and asset files over. To my puzzlement, the new project throws an error whenever I call "yarn start"
Starting the development server...
node:events:498
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on ClientRequest instance at:
at TLSSocket.socketErrorListener (node:_http_client:442:9)
at TLSSocket.emit (node:events:520:28)
at TLSSocket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:164:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
Node.js v17.4.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
For what it's worth, the old project doesn't throw an error despite that the src code is the same. The only difference is the packages.
I googled around and followed various advice, including this one: https://medium.com/#premal.katigar/how-to-fix-throw-er-unhandled-error-event-30172323a973. All to no avail.
There are a couple of clues that could be useful:
I use an antd landing page, which is basically a bunch of .jsx and .less files that constructs a page. If I replace that landing page code with some simple jsx component, e.g. something that simply returns an h1 tag, then there is no longer this node error. Yarn start would start the project fine.
The only differences between the old project that starts fine even with the aforementioned antd landing page, and the new one that throws the above error are that 1) the new project contains all the newest versions of the required packages, since I used "yarn install" for all the required packages 2) since I'm using the newest version of antd, instead of using "customize-cra", "react-app-wired", "babel-plugin-import" and "less-loader", I was simply using "craco-less". So the old project's "yarn start" actually called "react-app-rewired start" and the new one actually called "craco start".
I also tried downgrading node version from 17 to 16, and the error remained.
Any clue what might be the issue?

NodeJS and Gulp throws an error

I am having a problem when I try to run Gulp watch.
Here's the error being thrown:
[15:42:57] Using gulpfile ~/bartslaw-nyc/Gulpfile.js
[15:42:57] Starting 'browserSync'...
[15:42:57] Finished 'browserSync' after 17 ms
[15:42:57] Starting 'clean'...
[15:42:57] Finished 'clean' after 5.25 ms
[15:42:57] Starting 'pages'...
[15:42:57] 'pages' errored after 6.59 ms
[15:42:57] TypeError: Cannot read property 'length' of undefined
at flattenGlob (/home/k7/bartslaw-nyc/node_modules/glob2base/index.js:9:25)
at setToBase (/home/k7/bartslaw-nyc/node_modules/glob2base/index.js:48:12)
at module.exports (/home/k7/bartslaw-nyc/node_modules/glob2base/index.js:56:19)
at Object.gs.createStream (/home/k7/bartslaw-nyc/node_modules/glob-stream/index.js:34:42)
at Object.gs.create (/home/k7/bartslaw-nyc/node_modules/glob-stream/index.js:68:42)
at Gulp.src (/home/k7/bartslaw-nyc/node_modules/vinyl-fs/lib/src/index.js:33:23)
at Gulp.<anonymous> (/home/k7/bartslaw-nyc/Gulpfile.js:44:15)
at module.exports (/home/k7/bartslaw-nyc/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/home/k7/bartslaw-nyc/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/home/k7/bartslaw-nyc/node_modules/orchestrator/index.js:214:10)
[BS] Access URLs:
------------------------------------
Local: http://localhost:3000
External: http://192.168.1.3:3000
------------------------------------
UI: http://localhost:3001
UI External: http://192.168.1.3:3001
------------------------------------
[BS] Serving files from: _build
The issue is that on my browser there's just "Cannot GET /". Help me out on this one. This seems to have happened all of a sudden.
I have a repository on Bitbucket from where I pulled the initiate source files (this repository is created and maintained by me).
Any help is welcome. Thanks in advance. Do let me know if you need to see the gulp.config and gulpfile.js
i think its happening because of an npm package update where the version number was not bumped
It seems like there has an issue right now. You can follow the discussion below:
https://github.com/gulpjs/gulp/issues/1768

EPERM during gulp commands

I have a gulpfile that I am using together with Browserify, Babelify and BrowserSync to implement my build workflow. However, I am constantly having problems with EPERM errors in Node.js.
I first had an error in my gulp clean task that used rimraf in order to clean my dist directory. The task would occasionaly throw an error (I was not able to reproduce the error 100% of attempts though). The error was an EPERM that complained about the unlink action for ./dist/app.js. I tried using del instead of rimraf and for some reason it helped.
However, if I run gulp watch and something changes , there is very often this error now:
(node:10740) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[22:52:35] Using gulpfile D:\Workspace\milestones\gulpfile.js
[22:52:35] Starting 'clean'...
[22:52:35] Finished 'clean' after 4.2 ms
[22:52:35] Starting 'build-persistent'...
[22:52:37] Finished 'build-persistent' after 1.55 s
[22:52:37] Starting 'watch'...
[22:52:37] Finished 'watch' after 92 ms
[BS] Local URL: http://localhost:3000
[BS] External URL: http://192.168.0.108:3000
[BS] Serving files from: ./
[22:52:48] Starting 'clean'...
[22:52:48] Finished 'clean' after 2.77 ms
[22:52:48] Starting 'build-persistent'...
stream.js:74
throw er; // Unhandled stream error in pipe.
^
Error: EPERM: operation not permitted, open 'D:\Workspace\milestones\dist\app.js'
at Error (native)
The full gulpfile may be seen in the gist here.
I am running Windows 10.
Update: The issue seems to be absent when running gulp build and therefore might be caused by BrowserSync.

Fail to start browser sync

I'm new to these things. I just started to learn web development through a free course in Coursera, and I'm having trouble in setting up the development environment.
That's what I did: installed Sublime Text 3, git and node.js. Created a repository on git, a web page with Sublime and committed it to git.
Now I'm trying to start browser sync but I'm getting this:
$ browser-sync start --server --directory --files "*"
[BS] Access URLs:
-------------------------------------
Local: http: //localhost:3000
External: http: //192.168.0.13:3000
-------------------------------------
UI: http: //localhost:3001
UI External: http: //192.168.0.13:3001
-------------------------------------
[BS] Serving files from: ./
[BS] Watching files...
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
I searched a lot but couldn't find a solution.
Browser isn't synchronizing.
One of the mentors of the course helped me with the solution.
The cause of this error was that it was missing the C:\Windows\System32\ variable in the System Variables. I added it and it solved my problem.

Error in plugin 'gulp-notify': No reporter specified

I am trying to build a Sails.js and AngularJS app following this tutorial:
http://thoughtsmarkeddown.com/thoughts/javascript/setting-up-a-sails-js-with-angular-js-app-part-1/
I have setup my Sails App and angular App. Ater setting up the gulp file, which can be found here:
http://thoughtsmarkeddown.com/assets/Uploads/gulpfile.js
I ran the command gulp from my root folder and got the following error:
stream.js:94
throw er; // Unhandled stream error in pipe.
^
[gulp] Error in plugin 'gulp-notify': No reporter specified.
I have no idea how to debug this. This is my first AngularJS app. Was just trying to use it with Sails for eaiser and faster development. If I am doing it the wrong way, can you suggest me some place else I should read about how to make a AngularJS + Sails.js app.
Following is the full stack trace:
[11:22:30] Using gulpfile ~/Prophesee Media/PropheseeDashboard/gulpfile.js
[11:22:30] Starting 'sass'...
[11:22:30] Finished 'sass' after 7.93 ms
[11:22:30] Starting 'sailsbasejs'...
[11:22:30] Finished 'sailsbasejs' after 3.04 ms
[11:22:30] Starting 'angularappjs'...
[11:22:30] Finished 'angularappjs' after 1.26 ms
[11:22:30] Starting 'bowerjs'...
[11:22:30] Finished 'bowerjs' after 5.78 ms
[11:22:30] Starting 'angularviews'...
[11:22:30] Finished 'angularviews' after 446 μs
[11:22:30] Starting 'watch'...
[11:22:30] Finished 'watch' after 216 ms
[11:22:30] Starting 'default'...
[11:22:30] Finished 'default' after 5.71 μs
stream.js:94
throw er; // Unhandled stream error in pipe.
^
[gulp] Error in plugin 'gulp-notify': No reporter specified.
at report (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp- notify/index.js:70:34)
at Transform.notify [as _transform] (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/index.js:19:5)
at Transform._read (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Transform._write (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:238:10)
at writeOrBuffer (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:228:5)
at Transform.Writable.write (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:195:11)
at Stream.ondata (stream.js:51:26)
at Stream.EventEmitter.emit (events.js:95:17)
at queueData (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp/node_modules/vinyl-fs/node_modules/map-stream/index.js:43:21)
What version of gulp-notify you are using? We had a similar issue on a CI-system on a linux machine (see this issue). To solve this we've updated gulp-notify to the actual version 1.3.1.
To update your dev-dependencies you must remove the actual version first and install it again. It's a known bug from npm that you cannot use npm update on dev-dependencies. So what do I do?
# remove
npm rm --save-dev gulp-notify
# install again
npm install --save-dev gulp-notify
May it's helpful for you.
Ciao
Ralf
It's a known issue:
https://github.com/webcomm/magento-boilerplate/issues/32
solution:
update gulp to 3.5.6
"devDependencies": {
"gulp": "~3.5.6",
}
Try below command :
npm install --save gulp-notify //use save this will save the dependencies in package.json
Hope this will work!!

Resources