Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you run the demo? #45

Closed
DaveMonag opened this issue Jul 11, 2017 · 13 comments
Closed

How do you run the demo? #45

DaveMonag opened this issue Jul 11, 2017 · 13 comments

Comments

@DaveMonag
Copy link

How do we run the demo contained within this project?

@hotforfeature
Copy link
Owner

cd origami/
npm run build
cd demo/
npm run install && bower install
npm start

@DaveMonag
Copy link
Author

DaveMonag commented Jul 12, 2017

From a fresh clone doing only that (starting inside c:\code\origami, and cd origami is to go into c:\code\origami\origami), on the npm run build I get this:

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   'run',
1 verbose cli   'build' ]
2 info using npm@3.10.10
3 info using node@v6.11.1
4 verbose stack Error: missing script: build
4 verbose stack     at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:151:19)
4 verbose stack     at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:61:5
4 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:356:5
4 verbose stack     at checkBinReferences_ (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:320:45)
4 verbose stack     at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:354:3)
4 verbose stack     at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:124:5)
4 verbose stack     at ReadFileContext.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:295:20)
4 verbose stack     at ReadFileContext.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16)
4 verbose stack     at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:366:13)
5 verbose cwd c:\Code\origami\origami
6 error Windows_NT 10.0.10586
7 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
8 error node v6.11.1
9 error npm  v3.10.10
10 error missing script: build
11 error If you need help, you may report this error at:
11 error     <https://github.com/npm/npm/issues>
12 verbose exit [ 1, true ]

Is there meant to be an npm install anywhere first? 

@DaveMonag
Copy link
Author

DaveMonag commented Jul 12, 2017

Otherwise, assuming the first cd was to get into the main package and not the sub-package, I get this error:

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   'run',
1 verbose cli   'build' ]
2 info using npm@3.10.10
3 info using node@v6.11.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle @codebakery/origami@1.2.3~prebuild: @codebakery/origami@1.2.3
6 verbose lifecycle @codebakery/origami@1.2.3~prebuild: unsafe-perm in lifecycle true
7 verbose lifecycle @codebakery/origami@1.2.3~prebuild: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;c:\Code\origami\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Users\h212970\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\OpenVPN\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\1E\NomadBranch\;C:\Program Files\nodejs\;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files\Android\Android Studio\jre\bin;C:\Users\h212970\AppData\Roaming\npm
8 verbose lifecycle @codebakery/origami@1.2.3~prebuild: CWD: c:\Code\origami
9 silly lifecycle @codebakery/origami@1.2.3~prebuild: Args: [ '/d /s /c', 'npm run clean' ]
10 silly lifecycle @codebakery/origami@1.2.3~prebuild: Returned: code: 1  signal: null
11 info lifecycle @codebakery/origami@1.2.3~prebuild: Failed to exec prebuild script
12 verbose stack Error: @codebakery/origami@1.2.3 prebuild: `npm run clean`
12 verbose stack Exit status 1
12 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
12 verbose stack     at emitTwo (events.js:106:13)
12 verbose stack     at EventEmitter.emit (events.js:191:7)
12 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
12 verbose stack     at emitTwo (events.js:106:13)
12 verbose stack     at ChildProcess.emit (events.js:191:7)
12 verbose stack     at maybeClose (internal/child_process.js:891:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
13 verbose pkgid @codebakery/origami@1.2.3
14 verbose cwd c:\Code\origami
15 error Windows_NT 10.0.10586
16 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
17 error node v6.11.1
18 error npm  v3.10.10
19 error code ELIFECYCLE
20 error @codebakery/origami@1.2.3 prebuild: `npm run clean`
20 error Exit status 1
21 error Failed at the @codebakery/origami@1.2.3 prebuild script 'npm run clean'.
21 error Make sure you have the latest version of node.js and npm installed.
21 error If you do, this is most likely a problem with the @codebakery/origami package,
21 error not with npm itself.
21 error Tell the author that this fails on your system:
21 error     npm run clean
21 error You can get information on how to open an issue for this project with:
21 error     npm bugs @codebakery/origami
21 error Or if that isn't available, you can get their info via:
21 error     npm owner ls @codebakery/origami
21 error There is likely additional logging output above.
22 verbose exit [ 1, true ]

@hotforfeature
Copy link
Owner

Yes, I'm sorry. I had assumed you already ran npm install to add the dependencies.

You should be in the root folder of the project (where package.json is) when you run the install and build commands. Looking at your debug output, that is C:\Code\origami. I forgot that one of the sub-folders was named origami, so that first step to CD into the project root was probably confusing.

@DaveMonag
Copy link
Author

DaveMonag commented Jul 12, 2017

I'd tried doing npm install initially, but the npm install seems to spit out a multitude of errors, which is why I assumed I was just missing a step or doing the wrong thing.
So this is the correct method?:

cd origami/
npm install
npm run build
cd demo/
npm run install && bower install
npm start

Latest version of stable node and npm, running npm install gives an error npm-debug.log 11,000 lines long, the last few lines being:

170697 silly lifecycle source-map-loader@0.2.1~postinstall: no script for postinstall, continuing
170698 silly postinstall standard-version@4.2.0 c:\Code\origami\node_modules\.staging\standard-version-76046227
170699 info lifecycle standard-version@4.2.0~postinstall: standard-version@4.2.0
170700 silly lifecycle standard-version@4.2.0~postinstall: no script for postinstall, continuing
170701 silly postinstall tslint@4.5.1 c:\Code\origami\node_modules\.staging\tslint-22e6aa77
170702 info lifecycle tslint@4.5.1~postinstall: tslint@4.5.1
170703 silly lifecycle tslint@4.5.1~postinstall: no script for postinstall, continuing
170704 silly postinstall typescript@2.4.1 c:\Code\origami\node_modules\.staging\typescript-6c451d42
170705 info lifecycle typescript@2.4.1~postinstall: typescript@2.4.1
170706 silly lifecycle typescript@2.4.1~postinstall: no script for postinstall, continuing
170707 silly postinstall validate-commit-msg@2.12.2 c:\Code\origami\node_modules\.staging\validate-commit-msg-8c2a0354
170708 info lifecycle validate-commit-msg@2.12.2~postinstall: validate-commit-msg@2.12.2
170709 silly lifecycle validate-commit-msg@2.12.2~postinstall: no script for postinstall, continuing
170710 silly postinstall webpack@2.7.0 c:\Code\origami\node_modules\.staging\webpack-ed69f72f
170711 info lifecycle webpack@2.7.0~postinstall: webpack@2.7.0
170712 silly lifecycle webpack@2.7.0~postinstall: no script for postinstall, continuing
170713 silly postinstall zone.js@0.8.12 c:\Code\origami\node_modules\.staging\zone.js-ee768fb7
170714 info lifecycle zone.js@0.8.12~postinstall: zone.js@0.8.12
170715 silly lifecycle zone.js@0.8.12~postinstall: no script for postinstall, continuing
170716 verbose unlock done using C:\Users\h212970\AppData\Roaming\npm-cache\_locks\staging-8494ea8a84dd3246.lock for c:\Code\origami\node_modules\.staging
170717 silly executeActions Finishing
170718 silly rollbackFailedOptional Starting
170719 silly rollbackFailedOptional Finishing
170720 silly install runPostinstallTopLevelLifecycles
170721 silly build @codebakery/origami@1.2.3
170722 info linkStuff @codebakery/origami@1.2.3
170723 silly linkStuff @codebakery/origami@1.2.3 has c:\ as its parent node_modules
170724 verbose linkBins @codebakery/origami@1.2.3
170725 verbose linkMans @codebakery/origami@1.2.3
170726 silly install @codebakery/origami@1.2.3 c:\Code\origami\@codebakery\origami-2e8a097c
170727 info lifecycle @codebakery/origami@1.2.3~install: @codebakery/origami@1.2.3
170728 silly lifecycle @codebakery/origami@1.2.3~install: no script for install, continuing
170729 silly postinstall @codebakery/origami@1.2.3 c:\Code\origami\@codebakery\origami-2e8a097c
170730 info lifecycle @codebakery/origami@1.2.3~postinstall: @codebakery/origami@1.2.3
170731 silly lifecycle @codebakery/origami@1.2.3~postinstall: no script for postinstall, continuing
170732 silly prepublish @codebakery/origami@1.2.3 c:\Code\origami\@codebakery\origami-2e8a097c
170733 info lifecycle @codebakery/origami@1.2.3~prepublish: @codebakery/origami@1.2.3
170734 verbose lifecycle @codebakery/origami@1.2.3~prepublish: unsafe-perm in lifecycle true
170735 verbose lifecycle @codebakery/origami@1.2.3~prepublish: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;c:\Code\origami\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Users\h212970\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\OpenVPN\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\1E\NomadBranch\;C:\Program Files\nodejs\;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files\Android\Android Studio\jre\bin;C:\Users\h212970\AppData\Roaming\npm
170736 verbose lifecycle @codebakery/origami@1.2.3~prepublish: CWD: c:\Code\origami
170737 silly lifecycle @codebakery/origami@1.2.3~prepublish: Args: [ '/d /s /c', 'npm run build' ]
170738 silly lifecycle @codebakery/origami@1.2.3~prepublish: Returned: code: 1  signal: null
170739 info lifecycle @codebakery/origami@1.2.3~prepublish: Failed to exec prepublish script
170740 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
170741 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
170742 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
170742 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
170742 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
170742 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
170743 warn optional SKIPPING OPTIONAL DEPENDENCY: weak@1.0.1 (node_modules\weak):
170744 warn optional SKIPPING OPTIONAL DEPENDENCY: weak@1.0.1 install: `node-gyp rebuild`
170744 warn optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY:
170745 verbose optional Failed at the weak@1.0.1 install script 'node-gyp rebuild'.
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY: Make sure you have the latest version of node.js and npm installed.
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY: If you do, this is most likely a problem with the weak package,
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY: not with npm itself.
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY: Tell the author that this fails on your system:
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY:     node-gyp rebuild
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY: You can get information on how to open an issue for this project with:
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY:     npm bugs weak
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY: Or if that isn't available, you can get their info via:
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY:     npm owner ls weak
170745 verbose optional SKIPPING OPTIONAL DEPENDENCY: There is likely additional logging output above.
170746 verbose stack Error: @codebakery/origami@1.2.3 prepublish: `npm run build`
170746 verbose stack Exit status 1
170746 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
170746 verbose stack     at emitTwo (events.js:106:13)
170746 verbose stack     at EventEmitter.emit (events.js:191:7)
170746 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
170746 verbose stack     at emitTwo (events.js:106:13)
170746 verbose stack     at ChildProcess.emit (events.js:191:7)
170746 verbose stack     at maybeClose (internal/child_process.js:891:16)
170746 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
170747 verbose pkgid @codebakery/origami@1.2.3
170748 verbose cwd c:\Code\origami
170749 error Windows_NT 10.0.10586
170750 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
170751 error node v6.11.1
170752 error npm  v3.10.10
170753 error code ELIFECYCLE
170754 error @codebakery/origami@1.2.3 prepublish: `npm run build`
170754 error Exit status 1
170755 error Failed at the @codebakery/origami@1.2.3 prepublish script 'npm run build'.
170755 error Make sure you have the latest version of node.js and npm installed.
170755 error If you do, this is most likely a problem with the @codebakery/origami package,
170755 error not with npm itself.
170755 error Tell the author that this fails on your system:
170755 error     npm run build
170755 error You can get information on how to open an issue for this project with:
170755 error     npm bugs @codebakery/origami
170755 error Or if that isn't available, you can get their info via:
170755 error     npm owner ls @codebakery/origami
170755 error There is likely additional logging output above.
170756 verbose exit [ 1, true ]
 

Where the previous 10,000 lines before the start of this were the same "no script for install, continuing" loop that you see at the top of this log for a few hundred more modules.
As for my first post, it was actually obvious that the first "cd origami/" meant the root folder otherwise "cd demo/" would have been a layer too low, so that's just me being stupid.

@hotforfeature
Copy link
Owner

This might be a problem with Windows and the && script separators. It looks like the npm install worked. After installing, npm will try to run the prepublish script, which I have set to build the project. Just because that failed though doesn't mean the others failed.

I don't know if cmd.exe and Powershell behave differently, but you could try running in one or the other. You just need to run npm run build now, shouldn't need to re-execute the whole install.

If that doesn't work, you can go into the package.json and find/replace && with ;. I think that should make the multiple command scripts work on Windows.

As a last step, you can also ignore the build and go directly into the demo/ folder and run npm install @codebakery/origami@latest and install from npm instead of the dist/ directory. You won't have the latest features, but I don't think there's much committed right now that's different from what's published anyway.

@DaveMonag
Copy link
Author

DaveMonag commented Jul 12, 2017

That was cmd.exe, but did also try in powershell. Running the npm install in powershell, it starts talking about Python path being missing first, which is weird:

PS C:\Code\origami> npm install

> weak@1.0.1 install C:\Code\origami\node_modules\weak
> node-gyp rebuild


C:\Code\origami\node_modules\weak>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\
\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\nod
e-gyp.js" "rebuild"
gyp ERR! cwd C:\Code\origami\node_modules\weak
gyp ERR! node -v v6.11.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

> @codebakery/origami@1.2.3 prepublish C:\Code\origami
> npm run build

...

etc (powershell wont let me copy anything more than 1 screen at a time, this bit didn't give errors though)

...

> @codebakery/origami@1.2.3 copy C:\Code\origami
> cpy '**/*.d.ts' '*.metadata.json' ../../dist/ --parents --cwd out-tsc/es6/ && node cp-package.js origami/package.json dist/package.j
son

Cannot glob `'**/*.d.ts','*.metadata.json'`: Cannot copy from `C:\Code\origami\out-tsc\es6\'**\*.d.ts'` to `C:\Code\origami\dist\'**\*
.d.ts'`: cannot stat path `C:\Code\origami\out-tsc\es6\'**\*.d.ts'`: ENOENT: no such file or directory, stat 'C:\Code\origami\out-tsc\
es6\'**\*.d.ts''

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "copy"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @codebakery/origami@1.2.3 copy: `cpy '**/*.d.ts' '*.metadata.json' ../../dist/ --parents --cwd out-tsc/es6/ && node cp-packag
e.js origami/package.json dist/package.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @codebakery/origami@1.2.3 copy script 'cpy '**/*.d.ts' '*.metadata.json' ../../dist/ --parents --cwd out-tsc/es
6/ && node cp-package.js origami/package.json dist/package.json'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @codebakery/origami package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cpy '**/*.d.ts' '*.metadata.json' ../../dist/ --parents --cwd out-tsc/es6/ && node cp-package.js origami/package.json dis
t/package.json
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @codebakery/origami
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @codebakery/origami
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Code\origami\npm-debug.log

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:origa
mi"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @codebakery/origami@1.2.3 build:origami: `npm run ngc && npm run rollup && npm run copy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @codebakery/origami@1.2.3 build:origami script 'npm run ngc && npm run rollup && npm run copy'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @codebakery/origami package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run ngc && npm run rollup && npm run copy
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @codebakery/origami
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @codebakery/origami
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Code\origami\npm-debug.log

And running npm run build gives an error at that point, but after replacing the "&&"s with ";"s it seems to finish building (? no errors but no dist file created though).

Bower install seems to work fine, but then running npm install in demo... (sigh):

PS C:\Code\origami\demo> npm install
npm ERR! addLocal Could not install C:\Code\origami\dist
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! path C:\Code\origami\dist
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open 'C:\Code\origami\dist'
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Code\origami\dist'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Code\origami\demo\npm-debug.log

I assume you meant npm install and not npm run install because that gives:

PS C:\Code\origami\demo> npm run install
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "install"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10

npm ERR! missing script: install

EDIT: Forgot to add this bit
Then running
npm install @codebakery/origami@latest
does install origami, but as the npm install fails, there's none of the angular stuff there to actually let npm start work.

EDIT 2:
Ok so actually running
npm install @codebakery/origami@latest --save
meant that I could then do
npm install
and wouldn't complain about the dist file (as it was bound to the npm version, not "file../dist") and hence installed the rest requested by npm.

Next, it seems that in your app.module.ts you're trying to import @codebakery/origami/collections when the real location is @codebakery/origami/lib/collections

Then...

It works :D

@hotforfeature
Copy link
Owner

It's saying the dist/ folder doesn't exist, but you also say the build command ran without failure? Do you see a C:\Code\origami\dist folder?

I noticed you're running an older version of npm. If you want to bypass the build and just use the latest version on npm, you'll need to add --save to npm install --save @codebakery/origami@latest to override what's in package.json.

@DaveMonag
Copy link
Author

Sorry, already made edits to previous comment. Please re-read.
Dist doesn't get created, but out-tsc does.

@DaveMonag
Copy link
Author

As for npm, I updated node today and that updated my npm version from 3.9 to 3.10.10, so assumed that was latest. Seems that the node stable install goes back that far. I'm on 5.2.0 now, cheers.

@hotforfeature
Copy link
Owner

hotforfeature commented Jul 12, 2017

If I read correctly, you were able to install origami from npm and the demo is working after changing the collections import path?

For the build issues, I'm guessing replacing && with ; didn't really work since only the first command that generates out-tsc/ happened. If you really need to get it to build (to use the latest version or test changes you make), you can run everything manually in order.

npm run clean
# Build main entry
npm run ngc:es6
npm run ngc:es5
npm run rollup:es6
npm run rollup:es5
npm run rollup:umd
npm run rollup:umd:min
npm run copy
node cp-package.js origami/package.json dist/package.json
# Coffee break
# Build collections entry
npm run ngc:c:es6
npm run ngc:c:es5
npm run rollup:c:es6
npm run rollup:c:es5
npm run rollup:c:umd
npm run rollup:c:umd:min
npm run copy:c
node cp-package.js origami/collections/package.json dist/collections/package.json
npm run legacy:c

^ hopefully that sheds light on why I use excessive &&...

You could also try & instead of &&, I read somewhere that might make multiple commands work on Windows.

@DaveMonag
Copy link
Author

DaveMonag commented Jul 12, 2017

Yes, after changing the && to ; the build gave no errors but didn't create a dist, tried in Powershell and cmd.exe, on the latest version (5.2.0) of npm.

Then by using
npm install @codebakery/origami@latest --save
which allowed a successful
npm install
thereafter, changing the

import {
  AppElementsModule,
  IronElementsModule,
  PaperElementsModule
} from '@codebakery/origami/collections';

which gave errors, as that isn't where collections is, to

import {
  AppElementsModule,
  IronElementsModule,
  PaperElementsModule
} from '@codebakery/origami/lib/collections';

followed by
npm start
then worked.
Cheers!

Were you trying to use && to mean
do x and y
or
do x and if successful, then y ?

Possibly (?) relevant docs here: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true

And this thread of people arguing seems helpful:
npm/npm#4040

@hotforfeature
Copy link
Owner

Sounds good! I'm going to close this since you've got the demo running. The collection import change is something that hasn't been published yet, which is why you had to modify when running from npm's version.

Yea, I develop in a Unix bash environment. It's always a challenge getting builds to work cross platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants