Polymer starter kit gulp error - polymer-starter-kit

after downloading and extracting psk1.2.1 and running npm install and bower install, when i run gulp i get the following output
MacBook-Pro-van-Marco:testb mspro$ gulp
[21:18:46] Using gulpfile ~/www/studies/polymer/testb/gulpfile.js
[21:18:46] Starting 'clean'...
[21:18:46] Finished 'clean' after 5.66 ms
[21:18:46] Starting 'default'...
[21:18:46] Starting 'copy'...
[21:18:46] Starting 'styles'...
[21:18:47] styles all files 98 B
[21:18:47] Finished 'styles' after 559 ms
[21:18:48] copy all files 12.75 MB
[21:18:48] Finished 'copy' after 1.72 s
[21:18:48] Starting 'elements'...
[21:18:48] Finished 'elements' after 3.49 ms
[21:18:48] Starting 'lint'...
[21:18:49] Starting 'images'...
[21:18:49] Starting 'fonts'...
[21:18:49] Starting 'html'...
[21:18:49] Finished 'fonts' after 142 ms
[21:18:51] Finished 'lint' after 2.41 s
[21:18:51] html all files 52.36 kB
[21:18:51] Finished 'html' after 1.35 s
[21:18:51] gulp-imagemin: Minified 6 images (saved 494 B - 1.4%)
[21:18:51] images all files 35.41 kB
[21:18:51] Finished 'images' after 1.64 s
[21:18:51] Starting 'vulcanize'...
ERROR finding /Users/mspro/www/studies/polymer/testb/dist/bower_components/paper-behaviors/paper-button-behavior.html
ERROR finding /Users/mspro/www/studies/polymer/testb/dist/bower_components/paper-behaviors/paper-inky-focus-behavior.html
the paper-behaviors folder was empty (except for the README.md)
i then copied the content of the bower_components/paper-behaviors folder of the psk-light download and the error was gone, but starting the demo with gulp resulted in an empty page
looking at the console in chrome i get following errors:
Uncaught TypeError: Polymer.IronMeta is not a function
/deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
iron-icon.html:168 Uncaught TypeError: this._meta.byKey is not a function
page.js:797 Uncaught TypeError: Cannot read property 'length' of undefined
here's where i give up for now,
my node version is v4.2.4 on mac osx 10.10.5
Chrome 47.0.2526.106 (64-bit)
does anyone have a idea how to solve this problem?
thanks

It would be helpful to include the actual commands you ran and which version of the PSK you tried. Here are the steps I followed and was able to get the PSK installed and run gulp and gulp serve without error.
Download Polymer Starter Kit
Under Intermediate - Advanced Users click on polymer-starter-kit-1.2.1.zip
Extract ZIP file to preferred location
Install Node.js if needed before running the next step
With Node.js installed, run the following one liner from the root of your Polymer Starter Kit download:
npm install -g gulp bower && npm install && bower install
OR if admin permission is needed:
sudo npm install -g gulp bower && npm install && bower install
NOTE: This step takes a few minutes to install all of the dependencies.
Then start the web server using this one liner from the root of your Polymer Starter Kit download:
gulp serve

Related

Module not found: Can't resolve './.htaccss' after installing React-boilerplate Dandelion starter project

I have downloaded Dandelion starter-project and decompressed it on a local folder. I ran:
npm i
npm run build:dll
and then
npm start
then it complains:
> dandelion_pro#1.6.1 start /home/......./dandelion/starter-project
> cross-env NODE_ENV=development node server
Happy[js]: Version: 5.0.1. Threads: 5 (shared pool)
Server started ! ✓
Access URLs:
-----------------------------------
Localhost: http://localhost:3001
LAN: http://xxx.xxx.xxx.xxx:3001
-----------------------------------
Press CTRL-C to stop
Webpack is building script...
Happy[js]: All set; signaling webpack to proceed.
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
webpack built 920e70412c607c0d50a6 in 3600ms
✖ 「wdm」:
ERROR in ./app/app.js
Module not found: Error: Can't resolve './.htaccess' in '/home/......./dandelion/starter-project/app'
# ./app/app.js 27:0-48
# multi ./node_modules/react-app-polyfill/ie11.js webpack-hot-middleware/client?reload=true ./app/app.js
I have searched the web looking for a solution, but I was unable to find one. My system is a Ubuntu 18.04.3 based machine running Linux Mint 19.3, nodejs 12.15.0 and npm 6.13.4. How can I solve this?
Well folks after an endless unsuccessful search on the web I created an empty ´.htaccess´ file and placed it into the ´app´ folder. Maybe this is not the better or the elegantest way to do it, but it worked for me.
I am posting this hoping it might be helpful.

Generating a new ServiceStack React Project is missing SharpPagesFeature

I updated to the latest #servicestack/cli
npm install -g #servicestack/cli
+ #servicestack/cli#1.0.8
updated 5 packages in 5.862s
Ran the dotnet-new command:
C:\Projects\Personal> dotnet-new react-spa POETS
> uglifyjs-webpack-plugin#0.4.6 postinstall C:\Projects\Personal\POETS\POETS\node_modules\webpack\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js
> poets#0.1.0 postinstall C:\Projects\Personal\POETS\POETS
> npm run build
> poets#0.1.0 build C:\Projects\Personal\POETS\POETS
> rimraf wwwroot/ && react-scripts-ts build && (move build wwwroot || mv build wwwroot)
Creating an optimized production build...
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
ts-loader: Using typescript#3.2.4 and C:\Projects\Personal\POETS\POETS\tsconfig.prod.json
Compiled successfully.
File sizes after gzip:
80.72 KB build\static\js\main.5832e8d6.js
29.7 KB build\static\css\main.4df18a76.css
The project was built assuming it is hosted at the server root.
You can control this with the homepage field in your package.json.
For example, add this to build it for GitHub Pages:
"homepage" : "http://myname.github.io/myapp",
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
1 dir(s) moved.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 1564 packages in 27.283s
MSBuild auto-detection: using msbuild version '16.0.360.33175' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\bin'.
Restoring packages for C:\Projects\Personal\POETS\POETS.ServiceInterface\POETS.ServiceInterface.csproj...
Restoring packages for C:\Projects\Personal\POETS\POETS.Tests\POETS.Tests.csproj...
Restoring packages for C:\Projects\Personal\POETS\POETS\POETS.csproj...
Restoring packages for C:\Projects\Personal\POETS\POETS.ServiceModel\POETS.ServiceModel.csproj...
GET https://api.nuget.org/v3-flatcontainer/servicestack.kestrel/index.json
GET https://api.nuget.org/v3-flatcontainer/servicestack/index.json
GET https://api.nuget.org/v3-flatcontainer/nunit/index.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.net.test.sdk/index.json
GET https://api.nuget.org/v3-flatcontainer/nunit3testadapter/index.json
GET https://api.nuget.org/v3-flatcontainer/servicestack.interfaces/index.json
OK https://api.nuget.org/v3-flatcontainer/servicestack.kestrel/index.json 194ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.kestrel/5.4.0/servicestack.kestrel.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/nunit/index.json 237ms
OK https://api.nuget.org/v3-flatcontainer/microsoft.net.test.sdk/index.json 246ms
OK https://api.nuget.org/v3-flatcontainer/nunit3testadapter/index.json 248ms
OK https://api.nuget.org/v3-flatcontainer/servicestack.interfaces/index.json 263ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.interfaces/5.4.0/servicestack.interfaces.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/servicestack/index.json 318ms
GET https://api.nuget.org/v3-flatcontainer/servicestack/5.4.0/servicestack.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/servicestack.kestrel/5.4.0/servicestack.kestrel.5.4.0.nupkg 162ms
OK https://api.nuget.org/v3-flatcontainer/servicestack.interfaces/5.4.0/servicestack.interfaces.5.4.0.nupkg 149ms
OK https://api.nuget.org/v3-flatcontainer/servicestack/5.4.0/servicestack.5.4.0.nupkg 151ms
Installing ServiceStack.Interfaces 5.4.0.
GET https://api.nuget.org/v3-flatcontainer/servicestack.client/index.json
GET https://api.nuget.org/v3-flatcontainer/servicestack.common/index.json
OK https://api.nuget.org/v3-flatcontainer/servicestack.client/index.json 158ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.client/5.4.0/servicestack.client.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/servicestack.common/index.json 173ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.common/5.4.0/servicestack.common.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/servicestack.client/5.4.0/servicestack.client.5.4.0.nupkg 148ms
OK https://api.nuget.org/v3-flatcontainer/servicestack.common/5.4.0/servicestack.common.5.4.0.nupkg 146ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.text/index.json
OK https://api.nuget.org/v3-flatcontainer/servicestack.text/index.json 159ms
GET https://api.nuget.org/v3-flatcontainer/servicestack.text/5.4.0/servicestack.text.5.4.0.nupkg
OK https://api.nuget.org/v3-flatcontainer/servicestack.text/5.4.0/servicestack.text.5.4.0.nupkg 162ms
Committing restore...
Generating MSBuild file C:\Projects\Personal\POETS\POETS.ServiceModel\obj\POETS.ServiceModel.csproj.nuget.g.props.
Generating MSBuild file C:\Projects\Personal\POETS\POETS.ServiceModel\obj\POETS.ServiceModel.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Projects\Personal\POETS\POETS.ServiceModel\obj\project.assets.json
Restore completed in 1.79 sec for C:\Projects\Personal\POETS\POETS.ServiceModel\POETS.ServiceModel.csproj.
Installing ServiceStack.Text 5.4.0.
Installing ServiceStack.Client 5.4.0.
Installing ServiceStack.Common 5.4.0.
Installing ServiceStack 5.4.0.
Installing ServiceStack.Kestrel 5.4.0.
Committing restore...
Generating MSBuild file C:\Projects\Personal\POETS\POETS.ServiceInterface\obj\POETS.ServiceInterface.csproj.nuget.g.props.
Generating MSBuild file C:\Projects\Personal\POETS\POETS.ServiceInterface\obj\POETS.ServiceInterface.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Projects\Personal\POETS\POETS.ServiceInterface\obj\project.assets.json
Restore completed in 2.82 sec for C:\Projects\Personal\POETS\POETS.ServiceInterface\POETS.ServiceInterface.csproj.
Committing restore...
Generating MSBuild file C:\Projects\Personal\POETS\POETS.Tests\obj\POETS.Tests.csproj.nuget.g.props.
Generating MSBuild file C:\Projects\Personal\POETS\POETS.Tests\obj\POETS.Tests.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Projects\Personal\POETS\POETS.Tests\obj\project.assets.json
Restore completed in 2.84 sec for C:\Projects\Personal\POETS\POETS.Tests\POETS.Tests.csproj.
Committing restore...
Generating MSBuild file C:\Projects\Personal\POETS\POETS\obj\POETS.csproj.nuget.g.props.
Generating MSBuild file C:\Projects\Personal\POETS\POETS\obj\POETS.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Projects\Personal\POETS\POETS\obj\project.assets.json
Restore completed in 2.86 sec for C:\Projects\Personal\POETS\POETS\POETS.csproj.
NuGet Config files used:
C:\Projects\Personal\POETS\NuGet.Config
C:\Users\willi\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
https://api.nuget.org/v3/index.json
Installed:
1 package(s) to C:\Projects\Personal\POETS\POETS.ServiceModel\POETS.ServiceModel.csproj
5 package(s) to C:\Projects\Personal\POETS\POETS.ServiceInterface\POETS.ServiceInterface.csproj
6 package(s) to C:\Projects\Personal\POETS\POETS.Tests\POETS.Tests.csproj
5 package(s) to C:\Projects\Personal\POETS\POETS\POETS.csproj
Opened the App in Visual Studio 2017, and have a missing dependency for SharpPagesFeature.
public override void Configure(Container container)
{
Plugins.Add(new SharpPagesFeature()); // <--- Can't resolve this
SetConfig(new HostConfig
{
AddRedirectParamsToQueryString = true,
DebugMode = AppSettings.Get(nameof(HostConfig.DebugMode), false)
});
}
Does anyone know what package this is from? I see on GitHub that SharpPagesFeature is in the main namespace (ServiceStack).
EDIT
Additionally, the generated MyService.cs has incorrect dependencies and missing imports:
using ServiceStack.Script; <--- this can't be resolved and is unused
new PageResult(Request.GetPage("/")); <-- this requires me to import ServiceStack.Templates.PageResult (which resolves fine)
You have an old pre-release v5.4.1 of ServiceStack installed.
You'll need to clear your NuGet packages cache to install the latest version, e.g:
$ nuget locals all -clear

Angular theme start

I have problem with starting Angular theme. I have installed everything on this planet, and that wont work.
When i start gulp serve in cmd , this is response:
D:\Kolokvijumi\blur-admin-master\blur-admin-master\node_modules>gulp serve
[21:07:45] Working directory changed to D:\Kolokvijumi\blur-admin-master\blur-ad
min-master
[21:07:46] Using gulpfile D:\Kolokvijumi\blur-admin-master\blur-admin-master\gul
pfile.js
[21:07:46] Starting 'scripts'...
[21:07:46] Starting 'styles'...
[21:07:46] Starting 'stylesAuth'...
[21:07:46] Starting 'styles404'...
[21:07:46] Starting 'copyVendorImages'...
D:\Kolokvijumi\blur-admin-master\blur-admin-master\node_modules\eslint\lib\eslin
t.js:706
throw ex;
^
TypeError: Error while loading rule 'react/display-name': ruleCreator is not a f
unction
at D:\Kolokvijumi\blur-admin-master\blur-admin-master\node_modules\eslint\li
b\eslint.js:692:28
at Array.forEach (native)
at EventEmitter.module.exports.api.verify (D:\Kolokvijumi\blur-admin-master\
blur-admin-master\node_modules\eslint\lib\eslint.js:671:16)
at processText (D:\Kolokvijumi\blur-admin-master\blur-admin-master\node_modu
les\eslint\lib\cli-engine.js:230:27)
at CLIEngine.executeOnText (D:\Kolokvijumi\blur-admin-master\blur-admin-mast
er\node_modules\eslint\lib\cli-engine.js:686:26)
at verify (D:\Kolokvijumi\blur-admin-master\blur-admin-master\node_modules\g
ulp-eslint\index.js:20:17)
at Transform._transform (D:\Kolokvijumi\blur-admin-master\blur-admin-master\
node_modules\gulp-eslint\index.js:38:18)
at Transform._read (_stream_transform.js:167:10)
at Transform._write (_stream_transform.js:155:12)
at doWrite (_stream_writable.js:334:12)
I installed eslint, npm, babel-eslint but didnt help..
A couple of suggestions:
1) since npm is kinda buggy, you should definitely try to wipe you node_modules folder and give an npm cache clean command. After that try reinstalling everything again with npm install
2) which version of Node are you using? There may be any compatibility issues with your current node version and the one needed by you modules. You should also have to try to use nvm to manage multiple node version on your system
--- EDIT (after the other answer) ---
Probably you need to (re)install ESLint Config Defaults module.

Problems with grunt serve

I have project, but i can't run him. I use WebStorm IDE and after enter grunt serve I catch next errors:
grunt serve
Loading "connect.js" tasks...ERROR
>> SyntaxError: C:\Users\TT\Documents\ES\frontend\node_modules\grunt-contrib-connect\node_modules\connect\node_modules\type-is\node_modules\mime-types\node_modules\mime-db\db.json: Unexpect
ed end of input
Loading "cssmin.js" tasks...ERROR
>> Error: Cannot find module './source-map/source-map-generator'
Loading "jshint.js" tasks...ERROR
>> Error: Cannot find module 'jshint/src/cli'
Loading "uglify.js" tasks...ERROR
>> Error: Cannot find module 'pako/lib/zlib/messages'
Loading "cdnify.js" tasks...ERROR
>> SyntaxError: C:\Users\TT\Documents\ES\frontend\node_modules\grunt-google-cdn\node_modules\google-cdn\node_modules\cdnjs-cdn-data\external\cdnjs.json: Unexpected end of input
Loading "inline_angular_templates.js" tasks...ERROR
>> Error: Cannot find module 'domutils'
Running "serve" task
Warning: Task "connect:livereload" not found. Use --force to continue.
Aborted due to warnings.
Execution Time (2015-05-10 09:03:36 UTC)
loading tasks 18ms █████████████████████████████████████████████████████████████████████████████████████████████████████████ 56%
serve 11ms ████████████████████████████████████████████████████████████████ 34%
Total 32ms
Can you help me? How to fix it and what need install in order to this project earned?
I found a solution.
Here are the steps:
Remove nodejs and all npm's.
Install node
npm install
npm install -g bower
bower install
grunt serve
Success
um... run:
$ grunt -v
this will give you the missing (corrupted) node_modules. Sometimes things get corrupted or such.
I ran into this same problem with grunt-google-cdn and reinstalled it. with $ npm install grunt-google-cdn --save and everything went fine after that :)
reinstalling everything is generally not required.

AngularJS GULP BrowerSync Error: ENAMETOOLONG, name too long

I need your help with this famous angular JS project that I downloaded from git. https://github.com/thaiat/famous-flickr
When i run gulp browser sync and I get this ENAMETOOLONG error and I am not sure how to fix it.
aj$ gulp browsersync
[23:45:56] Using gulpfile ~/famous-flickr/gulpfile.js
[23:45:56] Starting 'browserify'...
[23:45:56] Finished 'browserify' after 23 ms
[23:45:56] Starting 'fonts'...
[23:45:56] Finished 'fonts' after 3.37 ms
[23:45:56] Starting 'style'...
[23:45:56] Starting 'style:watch'...
[23:45:56] Finished 'style:watch' after 7.39 ms
fs.js:438
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENAMETOOLONG, name too long '/Users/famous-`flickr/client/styles/data:application/json;base64,
at Object.fs.openSync (fs.js:438:18)
at Object.fs.readFileSync (fs.js:289:15)
at fromSource (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/utils/input-source-map-tracker.js:67:31)
at InputSourceMapStore.track (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/utils/input-source-map-tracker.js:137:5)
at Object.whenDone (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:96:44)
at processNext (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:105:13)
at importFrom (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:79:10)
at ImportInliner.process (/Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:36:10)
at /Users/DhanLalRaj/famous-flickr/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:71:41
at process._tickDomainCallback (node.js:463:13)
It seems this is a problem that can come up with map files during the minification process. See https://github.com/FlagshipWP/compass/issues/29 where that project ran into a similar problem.
A solution that worked for me was to simply suppress sass from creating map files. If you have a gulp project just set the configuration parameters for sass:
<...>
.pipe(sass, mainSass, {
sourcemap:false,
loadPath: ['resources/bower_components']
})
<...>
If you run sass from the command line it would be:
sass blahblahblah.css --sourcemap=none

Resources