I'm trying to run the Polymer Docs locally, but I get an error when trying to serve the app with grunt:
Running "appengine:run:frontend" (appengine) task
executing: dev_appserver.py --port=3000 --host=0.0.0.0 .
Fatal error: spawn dev_appserver.py ENOENT
(Full output)
The only relevant info I could find was this on the polymer-dev forum, but in that case the issue was using the incorrect Google App Engine SDK. I am using the Python SDK and I'm running Python 2.7.9.
EDIT: If you're finding this now, it's much easier to avoid this issue and use Gulp instead, basing it off of the Polymer Starter Kit gulpfile.
I was having the same troubles on Ubuntu 14.04. The solution for me was to add the absolute path to the Google App Engine Python SDK directory to my $PATH environment variable.
Edit shell startup script (I'm assuming you're using bash):
vim ~/.bashrc
Add the absolute path to Google App Engine directory:
PATH="$PATH:/absolute/path/to/google_app_engine"
Save and close file.
Remember that the changes won't take effect until the next time your shell starts up, so close and re-open your terminal now.
If that doesn't help, keep in mind that the ENOENT error generally means that a script is trying to access a file or directory that doesn't exist. So, for some reason, the path that Grunt is using to access the Google App Engine is incorrect.
Related
I am programming using Meteor.js and the IDE am using is WebStorm; whenever I hit run in WebStorm I get this kind of error:
The system cannot find the path specified.
I don't know how to fix it. I've tried to visit the paths that are in the WebStorm output, but I found meteor.bat & runnerw.exe
"C:\Program Files (x86)\JetBrains\WebStorm 2016.3.4\bin\runnerw.exe" C:\Users\forland\AppData\Local\.meteor\meteor.bat
The system cannot find the path specified.
Process finished with exit code 3
Have you correctly followed the Running and debugging a Meteor application instructions in the WebStorm help guide? It sounds like WebStorm is not able to find the meteor executable.
Here are some other resources that could help.
Run/Debug Configuration: Meteor
Languages and Frameworks: Meteor
Also, try running your meteor project outside of WebStorm to make sure you don't have a meteor executable problem.
From the command line, browse to your meteor project's folder.
Run the project
meteor run
Update your question if you get an errors or have more information after trying these resources.
Backstory
I've been trying to set up a project in Visual Studio, which uses GulpJS to compile Sass. I was told that VS should automatically recognize the package.json inside a project and run npm install, but I had to do that manually through a command line. Even then, when I opened Task Runner Explorer, it says that there are (No tasks found). My coworker and I looked up solutions that worked for other people, many of which reported having success after restarting VS, clearing some cached data, or reinstalling the node modules; however none of those worked for me. Here are some solutions I've attempted:
Visual Studio 2015 RC Gulp task runner not detecting tasks (All Answers)
https://stackoverflow.com/a/37437209/6425704
Basically the entire first page of Google for "visual studio gulp no tasks found"
The Problem
After some digging, I came across the Package Manager Console and decided that maybe I can run gulp through that instead of opening a separate CMD window. However, when I did, I got the following:
[11:27:43] Local gulp not found in C:\
[11:27:43] Try running: npm install gulp
My immediate thought was that I might need to reinstall the dependencies, so I ran npm install and got this output:
npm : npm WARN enoent ENOENT: no such file or directory, open 'C:\package.json'
At line:1 char:1
+ npm install
+ ~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (npm WARN enoent...:\package.json':String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm
WARN
!invalid#1 No license field.
This is when I noticed that it is looking for C:\package.json instead of the one inside my Project directory. However, when I ran ls, it clearly shows that it's inside the Solution root, at C:\Dev\solution-name. I tried navigating to the specific Project, using cd Presentation\Nop.Web, but I still get the result of it looking in the C:\ root. Can anyone explain why this is happening and how I can fix it?
I finally figured it out (one more day, and I would've offered a bounty for this question), and it's not a problem with VS. Back when I first started using this specific computer and was still using Windows' default Command Prompt, I didn't like it starting in %USERPROFILE% by default. So I looked for a way change the default and stumbled upon a registry "hack" which essentially runs cd C:/ on cmd.exe startup. However, it turns out that this causes other command line tools, including Powershell and VS's Package Manager to run that command.
If anyone else is experiencing this issue (which, due to the nature of this situation, I doubt anyone has), you can try following these steps:
Open up Registry Editor. I did it by using the Windows Run tool (Win + R) and typing regedit.
Navigate to HKEY_CURRENT_USER > SOFTWARE > Microsoft > Command Processor.
Remove AutoRun (or change its value to something that won't interfere with your workflow).
More info here.
Original Registry Tutorial (Note that if I had scrolled down a bit more, I might have avoided this situation.)
I am trying to build a Meteor app using meteor build --directory ../dist. Everything seems to build fine, but when I follow the instructions provided in the generated README file I get an error saying the server/main.js file can't load. When I looked, I saw that the main.js file is not there.
Is there something I need to do before I build to ensure the file exists after build?
I'm having a very difficult time trying to build the Meteor app for a production serve, and I can't seem to find any clear instructions. The Meteor doc instructions are very vague in regard to build.
I can see how the README can be confusing if not followed as intended.
The first command line states:
$ (cd programs/server && npm install)
Note the parentheses.
Those cause the command to run in a subshell, which means that your shell will remain in the same directory after the command execution is done.
However, if you only execute the inner commands, you will end up in the programs/server directory and experience what you describe.
In any case, $ node main.js should be run from the bundle's root directory.
I am following the installation guidelines as described on mean.js.org Everything seemed to install fine. I have all prereqs installed. I ran npm install after cloning the github repo and then tried to run grunt and I didnt get any errors however It seems to just be stalling on the command line. Last message on the command line is the "debugger is running on port 5858" and then it just sits there.
After some time the message [nodemon] watching 51,839 files - this might cause high cpu usage. To reduce use "--watch" comes up. I am on windows 10 and have all the latest versions of node,npm,grunt and mean.js. I am running the command line as admin.
Mean.js should be running on localhost:3000 but it is not.
This is intended.
There is an application invoked by the grunt command and running in background, watching your files for changes. In default configuration: nodemon and grunt-watch.
This will execute specific tasks based on the files you edited, such as linting JS files or compiling LESS files.
The cmd will probably show something when you edit files in the projects directory.
My meteor application works locally. When I bundle it (using meteor bundle myapp.tgz), upload it on my server and launch it, I have the following error upon opening the page on Chrome console:
Uncaught SyntaxError: Unexpected token <
On Firefox console:
SyntaxError: syntax error
[Break On This Error]
<!DOCTYPE html>
In order to try to find the origin of the error, I used an old bundle that was working. I can see the problem is that the files in static_cachable are not found.
Meteor is still trying to use the files from the old bundle.
If I rename the new bundled files in static_cachable to the old name then It works.
I checked in all files contained by the root of the bundle folder and references are correct (they are pointing to the new names).
It there some cache somewhere that keep the reference to the old static_caches files ?
To avoid the error, one has to restart Meteor after deployement :
rm -rf bundle
tar -zxf myapp.tar.gz
cd bundle/server/node_modules/
rm -r fibers
npm install fibers#1.0.0
export PORT=32632
export MONGO_URL=mongodb://meteor:**#localhost:18700/moviegrid
export ROOT_URL='mydomain.com'
nohup node bundle/main.js &
Look at the javascript console when you load your app locally and check if there is no error. If there is some, correct them before bundling/deploy.
This may not be your problem but according to http://docs.meteor.com/#deploying:
For now, bundles will only run on the platform that the bundle was created on. To run on a different platform, you'll need to rebuild the native packages included in the bundle. To do that, make sure you have npm available, and run the following:
$ cd bundle/server/node_modules
$ rm -r fibers
$ npm install fibers#1.0.0
Consider installing meteor on your server, cloning your app directory and using meteor run inside the directory to see if the app runs in development on the server.
If it successfully launches in development then bundle it on the server and use those files. Or just run with meteor --production