I tried to deploy to my DO with mup
got the following error
gyp info spawn args '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.node-gyp/0.10.31/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/0.10.31',
gyp info spawn args '-Dmodule_root_dir=/opt/meteor/tmp/bundle/programs/server/npm/npm-container/node_modules/phantom/node_modules/dnode/node_modules/weak',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gyp info ok
npm WARN package.json meteor-dev-bundle#0.0.0 No description
npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle#0.0.0 No README data
bash: line 107: wait-for-mongo: command not found
-----------------------------------STDOUT-----------------------------------
' of package 'npm-container'
make: Entering directory `/opt/meteor/tmp/bundle/programs/server/npm/npm-container/node_modules/phantom/node_modules/dnode/node_modules/weak/build'
CXX(target) Release/obj.target/weakref/src/weakref.o
SOLINK_MODULE(target) Release/obj.target/weakref.node
SOLINK_MODULE(target) Release/obj.target/weakref.node: Finished
COPY Release/weakref.node
make: Leaving directory `/opt/meteor/tmp/bundle/programs/server/npm/npm-container/node_modules/phantom/node_modules/dnode/node_modules/weak/build'
> fibers#1.0.1 install /opt/meteor/tmp/bundle/programs/server/node_modules/fibers
> node ./build.js
`linux-x64-v8-3.14` exists; testing
Binary is fine; exiting
underscore#1.5.2 node_modules/underscore
semver#2.2.1 node_modules/semver
source-map-support#0.2.5 node_modules/source-map-support
└── source-map#0.1.29 (amdefine#0.1.0)
fibers#1.0.1 node_modules/fibers
meteor stop/waiting
meteor start/running, process 18068
Waiting for MongoDB to initialize. (5 minutes)
the log shows only one error couple of times
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EACCES
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1023:19)
at listen (net.js:1064:10)
at net.js:1146:9
at dns.js:72:18
at process._tickCallback (node.js:419:13)
error: Forever detected script exited with code: 8
error: Script restart attempt #1
>> stepping down to gid: meteoruser
>> stepping down to uid: meteoruse
Anyone had in this situation before?
what is the issue here?
Thanks in advance
First visit to your app and apply stop meteor. Then try to restart the server and deploy again.
Related
I am getting the below error while publishing the React+dotnet core application using Github Actions. I am using the GitHub self-hosted runners on my windows server 2016.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ptrx_backoffice#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ptrx_backoffice#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!
C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2021-02-11T15_54_47_880Z-debug.log
D:\aayush\ptrx_backoffice\ptrx_backoffice\PTRX_BackOffice.csproj(49,5): error MSB3073: The command "npm run build" exited with code 1.
Error: Process completed with exit code 1.
Logfile 2021-02-11T15_54_47_880Z-debug.log output is as below. I have tried deleting node-modules, cleaned cache using npm but it doesn't seem an issue with NPM as it's clearly saying in the logs that this is not related to NPM. Please let me know if someone can help on it.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm#6.13.4
3 info using node#v12.16.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle ptrx_backoffice#0.1.0~prebuild: ptrx_backoffice#0.1.0
6 info lifecycle ptrx_backoffice#0.1.0~build: ptrx_backoffice#0.1.0
7 verbose lifecycle ptrx_backoffice#0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle ptrx_backoffice#0.1.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\aayush\ptrx_backoffice\ptrx_backoffice\ClientApp\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\PHP\v7.1;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Users\Administrator\AppData\Roaming\npm;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Apache24\bin;C:\Users\Administrator\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\PuTTY\;C:\python\Scripts\;C:\python\;C:\Program Files\Scripts\;C:\Program Files\;C:\Users\Administrator\AppData\Roaming\npm;C:\Apache24\bin;C:\Program Files\JetBrains\PyCharm Community Edition 2020.1\bin;;C:\Users\Administrator\.dotnet\tools
9 verbose lifecycle ptrx_backoffice#0.1.0~build: CWD: D:\aayush\ptrx_backoffice\ptrx_backoffice\ClientApp
10 silly lifecycle ptrx_backoffice#0.1.0~build: Args: [ '/d /s /c', 'react-scripts build' ]
11 silly lifecycle ptrx_backoffice#0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle ptrx_backoffice#0.1.0~build: Failed to exec build script
13 verbose stack Error: ptrx_backoffice#0.1.0 build: `react-scripts build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:321:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:321:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid ptrx_backoffice#0.1.0
15 verbose cwd D:\aayush\ptrx_backoffice\ptrx_backoffice\ClientApp
16 verbose Windows_NT 6.3.9600
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v12.16.0
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error ptrx_backoffice#0.1.0 build: `react-scripts build`
22 error Exit status 1
23 error Failed at the ptrx_backoffice#0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
According tho this link:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/f70c2425-14de-49cf-b228-d29548c9ef87/getting-error-msb3073?forum=msbuild
You may have a wrong path set somewhere, just to quote the article:
Generally speaking, the Error MSB3073 is generally caused by an incorrect path in the command line.
Now, in your PATH you have, in particular, this value:
D:\aayush\ptrx_backoffice\ptrx_backoffice\ClientApp\node_modules\.bin;
But, and this is where the issue seems to be, you call this command:
C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
It looks that you are trying to execute a binary that does not exists.
My feeling is that you are using a development environment variable in your production environment.
I am trying to setup firebase Command line interface(CLI) in windows 10, I used the below command to install firebase tools
npm install -g firebase-tools
But my installation get failed saying
npm ERR! Unexpected end of JSON input while parsing near '..."./bin/express"},"dir'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\raj kumar\AppData\Roaming\npm-cache\_logs\2019-05-11T04_40_26_201Z-debug.log
Log says
148 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '..."./bin/express"},"dir'
148 verbose stack at JSON.parse (<anonymous>)
148 verbose stack at parseJson (C:\snapshot\firepit\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
148 verbose stack at Body.json.consumeBody.call.then.buffer (C:\snapshot\firepit\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\body.js:96:50)
148 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
149 verbose cwd C:\Users\raj kumar\Downloads
150 verbose Windows_NT 10.0.16299
151 verbose argv "C:\\Users\\RAJKUM~1\\DOWNLO~1\\firebase-cli.exe" "C:\\snapshot\\firepit\\node_modules\\npm\\bin\\npm-cli" "--script-shell=C:\\Users\\RAJKUM~1\\CACHE~1\\firebase\\bin/shell.bat" "--globalconfig=C:\\Users\\RAJKUM~1\\CACHE~1\\firebase\\bin\\npmrc" "install" "-g" "--verbose" "npm" "firebase-tools"
152 verbose node v10.4.1
153 verbose npm v6.1.0
154 error Unexpected end of JSON input while parsing near '..."./bin/express"},"dir'
155 verbose exit [ 1, true ]
Can anyone help me out with this ?
Node and NPM have newer versions. Try updating them, it may solve the issue.
Then run
npm cache clean --force
Symfony 4.1 with webpack encore gives error on run with npm/yarn
I followed the steps mentioned in official documentation of symfony, after successfully installing via composer require webpack-encore and after npm install, I tried npm run dev and got below error, same permission denied occurs when using yarn encore dev.
I'm using debian 9
kamii#kamii-workstation:~$ node -v
v10.9.0
kamii#kamii-workstation:~$ npm -v
6.4.1
kamii#kamii-workstation:~$ yarn -v
1.9.4
VIA NPM:
kamii#kamii-workstation:/media/disks/Development/dev_lab_gen/exim_pos$ npm run dev
> # dev /media/disks/Development/dev_lab_gen/exim_pos
> encore dev
sh: 1: encore: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! # dev: `encore dev`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the # dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kamii/.npm/_logs/2018-09-03T20_11_01_530Z-debug.log
Via Yarn
kamii#kamii-workstation:/media/disks/Development/dev_lab_gen/exim_pos$ yarn encore dev
yarn run v1.9.4
$ /media/disks/Development/dev_lab_gen/exim_pos/node_modules/.bin/encore dev
/bin/sh: 1: /media/disks/Development/dev_lab_gen/exim_pos/node_modules/.bin/encore: Permission denied
error Command failed with exit code 126.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Here is the NPM log file
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dev' ]
2 info using npm#6.4.1
3 info using node#v10.9.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle #~predev: #
6 info lifecycle #~dev: #
7 verbose lifecycle #~dev: unsafe-perm in lifecycle true
8 verbose lifecycle #~dev: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/media/disks/Development/dev_lab_gen/exim_pos/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle #~dev: CWD: /media/disks/Development/dev_lab_gen/exim_pos
10 silly lifecycle #~dev: Args: [ '-c', 'encore dev' ]
11 silly lifecycle #~dev: Returned: code: 126 signal: null
12 info lifecycle #~dev: Failed to exec dev script
13 verbose stack Error: # dev: `encore dev`
13 verbose stack Exit status 126
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:961:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
14 verbose pkgid #
15 verbose cwd /media/disks/Development/dev_lab_gen/exim_pos
16 verbose Linux 4.9.0-8-amd64
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
18 verbose node v10.9.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 126
22 error # dev: `encore dev`
22 error Exit status 126
23 error Failed at the # dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]
Try this:
./node_modules/.bin/encore dev-server
If so, you probably have the encore installed globally and therefore when you run it you do not have permission to do it in the global folder.
Write echo $PATH and check if encore is here.
I am going to lean on #Jose's comment and share some common pitfalls:
When installing encore did you put -g (for global) flag? If not, that could be the reason.
Another common thing is that your encore was indeed installed globally (possibly /usr/local/bin) but you OS does not see it. This could merely be due to bad $PATH. Try to run source ~/.bash_profile and then retry. If you still cannot run it, the path is probably not included in your $PATH.
Finally, I hit this one pretty hard some months ago with fresh installation of Centos, where node persistently failed to install anything globally. Tutorials on Google will tell you just to chmod 777 your /usr/bin or /usr/local/bin, which is just plain bad idea. Instead, configure your node to use different destination path for its modules.
Hope this helps a bit...
I was on a partition mounted with noexec flag by default. Adding exec flag explicitly in /etc/fstab solved my problem, even solved some other permission issues with gulp.
User mounted partitions, e.g. when using the ‘user’ or ‘users’ mount options in the /etc/fstab file, are done with the ‘noexec’ mount option by default for security reasons. This means that memory mapping (mmap) files for execution will be denied. Another reason can be the lack of kernel support for shared writable mmap which was added to Linux kernel 2.6.26.
Solution: Add the ‘exec’ mount option to the end of the mount options. It’s important that the option to be the last one, otherwise other mount option can over judge its effect. However please also note that Wine was not designed to run arbitrary applications directly from a Windows partition. To do so, one must install the Windows application via Wine onto the Windows partition first.
In my case removing node_modules folder and running yarn install helped. My directory permissions changed and it influenced locally installed encore.
I started a new Firebase project with the CLI.
I'm using only Cloud functions and wanted to deploy some functions
but Im getting this error
functions# lint: `tslint --project tsconfig.json`
I already changed following lines:
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
to
"npm --prefix \"%RESOURCE_DIR%\" run lint",
"npm --prefix \"%RESOURCE_DIR%\" run build"
because they also threw an error.
What do I need to change?
Edit:
I created a new Firebase project (In a folder called Firebase) with the cli and only use Cloud functions.
Then I copied all my .ts files into the src folder and added my dependencies.
"firebase-admin": "~5.12.1",
"firebase-functions": "^1.0.3",
"#types/async": "^2.0.48",
"#types/camelcase": "^4.1.0",
"#types/glob": "^5.0.35",
"#types/request": "^2.47.0",
"#types/xml2js": "^0.4.2",
"async": "^2.6.0",
"camelcase": "^4.1.0",
"glob": "^7.1.2",
"install": "0.10.4",
"npm": "5.6.0",
"request": "^2.85.0",
"xml2js": "^0.4.19"
Then I run firebase deploy and got the following:
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
npm ERR! path C:\...\Projects\Firebase\%RESOURCE_DIR%\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\...\Projects\Firebase\%RESOURCE_DIR%\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\...\AppData\Roaming\npm-cache\_logs\2018-06-19T20_48_36_986Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code4294963238
C:\...\Projects\Firebase>
The log file showed:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli '--prefix',
1 verbose cli '%RESOURCE_DIR%',
1 verbose cli 'run',
1 verbose cli 'lint' ]
2 info using npm#5.6.0
3 info using node#v8.9.4
4 verbose stack Error: ENOENT: no such file or directory, open 'C:\...\Projects\Firebase\%RESOURCE_DIR%\package.json'
5 verbose cwd C:\...\Projects\Firebase
6 verbose Windows_NT 10.0.17134
7 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "--prefix" "%RESOURCE_DIR%" "run" "lint"
8 verbose node v8.9.4
9 verbose npm v5.6.0
10 error path C:\...\Projects\Firebase\%RESOURCE_DIR%\package.json
11 error code ENOENT
12 error errno -4058
13 error syscall open
14 error enoent ENOENT: no such file or directory, open 'C:\...\Projects\Firebase\%RESOURCE_DIR%\package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -4058, true ]
I just edited the directory paths where necessary.
So I created another new project which uses hosting and functions.
I got the same error as above. After searching again I found this solution.
In the firebase.json file I replaced
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
},
with
"functions": {
"predeploy": [
"npm --prefix \"%RESOURCE_DIR%\" run lint",
"npm --prefix \"%RESOURCE_DIR%\" run build"
]
}
After reading this issues on Github
What it worked for me was delete node_modules from 'functions' folder and then install everything again. I think I should have tried this first instead of something else. Of course, make sure you have tslint dependency installed.
reinitialize firebase in your project
firebase init
My fear is that in the docker server, it does not have access to the command, or there is an issue with MUP's installation, but I assume I am missing something? (I am using MUP to deploy).
I am trying to run:
var assimp = spawn('assimp',['export','monster.gltf','monster.dae']);
assimp.stdout.on('data', function(data){
console.log('' +data);
});
assimp.on('close', function(code){
console.log('Assimp exited with code ' + code);
});
I sadly get an error:
Error: spawn assimp ENOENT
at exports._errnoException (util.js:907:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:189:32)
at onErrorNT (internal/child_process.js:355:16)
at nextTickCallbackWith2Args (node.js:458:9)
at process._tickDomainCallback (node.js:413:17)
I have run sudo apt-get assimp The command does exist on my $PATH.
My solution was to install the process from scratch on the server if it didn't exist....